You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Graeme Wallace <gr...@farecompare.com> on 2013/04/08 20:23:50 UTC

Best way to query multiple sets of rows

Hi,

Maybe there is an obvious way but i'm not seeing it.

I have a need to query HBase for multiple chunks of data, that is something
equivalent to

select columns
from table
where rowid between A and B
or rowid between C and D
or rowid between E and F
etc.

in SQL.

Whats the best way to go about doing this so that i dont have to issue
sequential Scans ?

-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Graeme Wallace <gr...@farecompare.com>.
Right - but is there a way of not tying up calling threads on the client
side - and pushing the information to the region servers so that they know
what rows to examine ?

Would this be possible in a co-processor ? (i admit i havent read up on
them yet)




On Mon, Apr 8, 2013 at 1:36 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> That's exact.
>
> In your situation, you will have to create 3 scans.
>
> One with startRow from A and endrow to B
> One with startRow from C and endrow to D
> One with startRow from E and endrow to F
>
> You can even do then in parallele if you want.
>
> JM
>
> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> > I thought a Scan could only cope with one start row and an end row ?
> >
> >
> > On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org
> >> wrote:
> >
> >> Hi Greame,
> >>
> >> The scans are the right way to do that.
> >>
> >> They will give you back all the data you need, chunck by chunk. Then
> >> yoiu have to iterate over the data to do what you want with it.
> >>
> >> What was your expectation? I'm not sure I'm getting your "so that i
> >> dont have to issue sequential Scans".
> >>
> >> jM
> >>
> >> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> >> > Hi,
> >> >
> >> > Maybe there is an obvious way but i'm not seeing it.
> >> >
> >> > I have a need to query HBase for multiple chunks of data, that is
> >> something
> >> > equivalent to
> >> >
> >> > select columns
> >> > from table
> >> > where rowid between A and B
> >> > or rowid between C and D
> >> > or rowid between E and F
> >> > etc.
> >> >
> >> > in SQL.
> >> >
> >> > Whats the best way to go about doing this so that i dont have to issue
> >> > sequential Scans ?
> >> >
> >> > --
> >> > Graeme Wallace
> >> > CTO
> >> > FareCompare.com
> >> > O: 972 588 1414
> >> > M: 214 681 9018
> >>
> >
> >
> >
> > --
> > Graeme Wallace
> > CTO
> > FareCompare.com
> > O: 972 588 1414
> > M: 214 681 9018
>



-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
That's exact.

In your situation, you will have to create 3 scans.

One with startRow from A and endrow to B
One with startRow from C and endrow to D
One with startRow from E and endrow to F

You can even do then in parallele if you want.

JM

2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> I thought a Scan could only cope with one start row and an end row ?
>
>
> On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
>> wrote:
>
>> Hi Greame,
>>
>> The scans are the right way to do that.
>>
>> They will give you back all the data you need, chunck by chunk. Then
>> yoiu have to iterate over the data to do what you want with it.
>>
>> What was your expectation? I'm not sure I'm getting your "so that i
>> dont have to issue sequential Scans".
>>
>> jM
>>
>> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
>> > Hi,
>> >
>> > Maybe there is an obvious way but i'm not seeing it.
>> >
>> > I have a need to query HBase for multiple chunks of data, that is
>> something
>> > equivalent to
>> >
>> > select columns
>> > from table
>> > where rowid between A and B
>> > or rowid between C and D
>> > or rowid between E and F
>> > etc.
>> >
>> > in SQL.
>> >
>> > Whats the best way to go about doing this so that i dont have to issue
>> > sequential Scans ?
>> >
>> > --
>> > Graeme Wallace
>> > CTO
>> > FareCompare.com
>> > O: 972 588 1414
>> > M: 214 681 9018
>>
>
>
>
> --
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Ted Yu <yu...@gmail.com>.
I forgot to mention that, assuming A is the smallest row key, you can use
the following method (of Scan) to narrow the rows scanned:

  public Scan setStartRow(byte [] startRow) {

Another related feature is HBASE-6509: Implement fast-forwarding
FuzzyRowFilter to allow filtering rows e.g. by "???alex?b"

Cheers

On Mon, Apr 8, 2013 at 1:31 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> Hi Graeme,
>
> Each time filterRowKey will return true, the entire row will be
> skipped, so the data related to this row will not be read. However,
> there might still be some disk access if everything is not in memory,
> but not more than if you are doing a "regular" scan without any
> filter.
>
> I still think that calling the 3 scan in a raw without any filter will
> be faster than using the filter since there will be less operations.
> But both options might work.
>
> JMS
>
> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> > Everyone - thanks for the replies.
> >
> > I have a followup question on Filters.
> >
> > boolean filterRowKey(byte [] buffer, int offset, int length)
> >
> > If i implement this to decide to include or exclude a row based upon my
> > sets of rowkey pairs.
> >
> > How much I/O is involved to disk on each region server ? Will it just
> read
> > row keys (hopefully from cache) until i say i need a row, then read the
> > KeyValues for the columns i want and then pass into filterKeyValue() ?
> >
> > Is that the most efficient way of doing it ? I dont see a way of hinting
> > for the next row i'm interested in (I'm assuming row keys are ordered
> ??),
> > so does that mean for each region all the row keys are passed into the
> > filter ?
> >
> >
> >
> > On Mon, Apr 8, 2013 at 1:39 PM, Ted Yu <yu...@gmail.com> wrote:
> >
> >> For Scan:
> >>
> >>  * To add a filter, execute {@link
> >> #setFilter(org.apache.hadoop.hbase.filter.Filter) setFilter}.
> >>
> >> Take a look at RowFilter:
> >>
> >>  * This filter is used to filter based on the key. It takes an operator
> >>
> >>  * (equal, greater, not equal, etc) and a byte [] comparator for the
> row,
> >>
> >> You can enhance RowFilter so that you may specify the pair(s) of start
> and
> >> end rows.
> >>
> >> Cheers
> >>
> >> On Mon, Apr 8, 2013 at 11:30 AM, Graeme Wallace <
> >> graeme.wallace@farecompare.com> wrote:
> >>
> >> > I thought a Scan could only cope with one start row and an end row ?
> >> >
> >> >
> >> > On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <
> >> > jean-marc@spaggiari.org
> >> > > wrote:
> >> >
> >> > > Hi Greame,
> >> > >
> >> > > The scans are the right way to do that.
> >> > >
> >> > > They will give you back all the data you need, chunck by chunk. Then
> >> > > yoiu have to iterate over the data to do what you want with it.
> >> > >
> >> > > What was your expectation? I'm not sure I'm getting your "so that i
> >> > > dont have to issue sequential Scans".
> >> > >
> >> > > jM
> >> > >
> >> > > 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> >> > > > Hi,
> >> > > >
> >> > > > Maybe there is an obvious way but i'm not seeing it.
> >> > > >
> >> > > > I have a need to query HBase for multiple chunks of data, that is
> >> > > something
> >> > > > equivalent to
> >> > > >
> >> > > > select columns
> >> > > > from table
> >> > > > where rowid between A and B
> >> > > > or rowid between C and D
> >> > > > or rowid between E and F
> >> > > > etc.
> >> > > >
> >> > > > in SQL.
> >> > > >
> >> > > > Whats the best way to go about doing this so that i dont have to
> >> issue
> >> > > > sequential Scans ?
> >> > > >
> >> > > > --
> >> > > > Graeme Wallace
> >> > > > CTO
> >> > > > FareCompare.com
> >> > > > O: 972 588 1414
> >> > > > M: 214 681 9018
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Graeme Wallace
> >> > CTO
> >> > FareCompare.com
> >> > O: 972 588 1414
> >> > M: 214 681 9018
> >> >
> >>
> >
> >
> >
> > --
> > Graeme Wallace
> > CTO
> > FareCompare.com
> > O: 972 588 1414
> > M: 214 681 9018
>

Re: Best way to query multiple sets of rows

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi Graeme,

Each time filterRowKey will return true, the entire row will be
skipped, so the data related to this row will not be read. However,
there might still be some disk access if everything is not in memory,
but not more than if you are doing a "regular" scan without any
filter.

I still think that calling the 3 scan in a raw without any filter will
be faster than using the filter since there will be less operations.
But both options might work.

JMS

2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> Everyone - thanks for the replies.
>
> I have a followup question on Filters.
>
> boolean filterRowKey(byte [] buffer, int offset, int length)
>
> If i implement this to decide to include or exclude a row based upon my
> sets of rowkey pairs.
>
> How much I/O is involved to disk on each region server ? Will it just read
> row keys (hopefully from cache) until i say i need a row, then read the
> KeyValues for the columns i want and then pass into filterKeyValue() ?
>
> Is that the most efficient way of doing it ? I dont see a way of hinting
> for the next row i'm interested in (I'm assuming row keys are ordered ??),
> so does that mean for each region all the row keys are passed into the
> filter ?
>
>
>
> On Mon, Apr 8, 2013 at 1:39 PM, Ted Yu <yu...@gmail.com> wrote:
>
>> For Scan:
>>
>>  * To add a filter, execute {@link
>> #setFilter(org.apache.hadoop.hbase.filter.Filter) setFilter}.
>>
>> Take a look at RowFilter:
>>
>>  * This filter is used to filter based on the key. It takes an operator
>>
>>  * (equal, greater, not equal, etc) and a byte [] comparator for the row,
>>
>> You can enhance RowFilter so that you may specify the pair(s) of start and
>> end rows.
>>
>> Cheers
>>
>> On Mon, Apr 8, 2013 at 11:30 AM, Graeme Wallace <
>> graeme.wallace@farecompare.com> wrote:
>>
>> > I thought a Scan could only cope with one start row and an end row ?
>> >
>> >
>> > On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <
>> > jean-marc@spaggiari.org
>> > > wrote:
>> >
>> > > Hi Greame,
>> > >
>> > > The scans are the right way to do that.
>> > >
>> > > They will give you back all the data you need, chunck by chunk. Then
>> > > yoiu have to iterate over the data to do what you want with it.
>> > >
>> > > What was your expectation? I'm not sure I'm getting your "so that i
>> > > dont have to issue sequential Scans".
>> > >
>> > > jM
>> > >
>> > > 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
>> > > > Hi,
>> > > >
>> > > > Maybe there is an obvious way but i'm not seeing it.
>> > > >
>> > > > I have a need to query HBase for multiple chunks of data, that is
>> > > something
>> > > > equivalent to
>> > > >
>> > > > select columns
>> > > > from table
>> > > > where rowid between A and B
>> > > > or rowid between C and D
>> > > > or rowid between E and F
>> > > > etc.
>> > > >
>> > > > in SQL.
>> > > >
>> > > > Whats the best way to go about doing this so that i dont have to
>> issue
>> > > > sequential Scans ?
>> > > >
>> > > > --
>> > > > Graeme Wallace
>> > > > CTO
>> > > > FareCompare.com
>> > > > O: 972 588 1414
>> > > > M: 214 681 9018
>> > >
>> >
>> >
>> >
>> > --
>> > Graeme Wallace
>> > CTO
>> > FareCompare.com
>> > O: 972 588 1414
>> > M: 214 681 9018
>> >
>>
>
>
>
> --
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Graeme Wallace <gr...@farecompare.com>.
Everyone - thanks for the replies.

I have a followup question on Filters.

boolean filterRowKey(byte [] buffer, int offset, int length)

If i implement this to decide to include or exclude a row based upon my
sets of rowkey pairs.

How much I/O is involved to disk on each region server ? Will it just read
row keys (hopefully from cache) until i say i need a row, then read the
KeyValues for the columns i want and then pass into filterKeyValue() ?

Is that the most efficient way of doing it ? I dont see a way of hinting
for the next row i'm interested in (I'm assuming row keys are ordered ??),
so does that mean for each region all the row keys are passed into the
filter ?



On Mon, Apr 8, 2013 at 1:39 PM, Ted Yu <yu...@gmail.com> wrote:

> For Scan:
>
>  * To add a filter, execute {@link
> #setFilter(org.apache.hadoop.hbase.filter.Filter) setFilter}.
>
> Take a look at RowFilter:
>
>  * This filter is used to filter based on the key. It takes an operator
>
>  * (equal, greater, not equal, etc) and a byte [] comparator for the row,
>
> You can enhance RowFilter so that you may specify the pair(s) of start and
> end rows.
>
> Cheers
>
> On Mon, Apr 8, 2013 at 11:30 AM, Graeme Wallace <
> graeme.wallace@farecompare.com> wrote:
>
> > I thought a Scan could only cope with one start row and an end row ?
> >
> >
> > On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <
> > jean-marc@spaggiari.org
> > > wrote:
> >
> > > Hi Greame,
> > >
> > > The scans are the right way to do that.
> > >
> > > They will give you back all the data you need, chunck by chunk. Then
> > > yoiu have to iterate over the data to do what you want with it.
> > >
> > > What was your expectation? I'm not sure I'm getting your "so that i
> > > dont have to issue sequential Scans".
> > >
> > > jM
> > >
> > > 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> > > > Hi,
> > > >
> > > > Maybe there is an obvious way but i'm not seeing it.
> > > >
> > > > I have a need to query HBase for multiple chunks of data, that is
> > > something
> > > > equivalent to
> > > >
> > > > select columns
> > > > from table
> > > > where rowid between A and B
> > > > or rowid between C and D
> > > > or rowid between E and F
> > > > etc.
> > > >
> > > > in SQL.
> > > >
> > > > Whats the best way to go about doing this so that i dont have to
> issue
> > > > sequential Scans ?
> > > >
> > > > --
> > > > Graeme Wallace
> > > > CTO
> > > > FareCompare.com
> > > > O: 972 588 1414
> > > > M: 214 681 9018
> > >
> >
> >
> >
> > --
> > Graeme Wallace
> > CTO
> > FareCompare.com
> > O: 972 588 1414
> > M: 214 681 9018
> >
>



-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Ted Yu <yu...@gmail.com>.
For Scan:

 * To add a filter, execute {@link
#setFilter(org.apache.hadoop.hbase.filter.Filter) setFilter}.

Take a look at RowFilter:

 * This filter is used to filter based on the key. It takes an operator

 * (equal, greater, not equal, etc) and a byte [] comparator for the row,

You can enhance RowFilter so that you may specify the pair(s) of start and
end rows.

Cheers

On Mon, Apr 8, 2013 at 11:30 AM, Graeme Wallace <
graeme.wallace@farecompare.com> wrote:

> I thought a Scan could only cope with one start row and an end row ?
>
>
> On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <
> jean-marc@spaggiari.org
> > wrote:
>
> > Hi Greame,
> >
> > The scans are the right way to do that.
> >
> > They will give you back all the data you need, chunck by chunk. Then
> > yoiu have to iterate over the data to do what you want with it.
> >
> > What was your expectation? I'm not sure I'm getting your "so that i
> > dont have to issue sequential Scans".
> >
> > jM
> >
> > 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> > > Hi,
> > >
> > > Maybe there is an obvious way but i'm not seeing it.
> > >
> > > I have a need to query HBase for multiple chunks of data, that is
> > something
> > > equivalent to
> > >
> > > select columns
> > > from table
> > > where rowid between A and B
> > > or rowid between C and D
> > > or rowid between E and F
> > > etc.
> > >
> > > in SQL.
> > >
> > > Whats the best way to go about doing this so that i dont have to issue
> > > sequential Scans ?
> > >
> > > --
> > > Graeme Wallace
> > > CTO
> > > FareCompare.com
> > > O: 972 588 1414
> > > M: 214 681 9018
> >
>
>
>
> --
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018
>

Re: Best way to query multiple sets of rows

Posted by James Taylor <jt...@salesforce.com>.
Hi Greame,
Are you familiar with Phoenix (https://github.com/forcedotcom/phoenix), 
a SQL skin over HBase? We've just introduced a new feature (still in the 
master branch) that'll do what you're looking for: transparently doing a 
skip scan over the chunks of your HBase data based on your SQL query. It 
leverages HBase's ability to have a filter return a "skip next" hint. 
We've found it can make a pretty dramatic performance (50x), depending 
on the cardinality of your data and the size of the chunks you're returning.

Thanks,
James
@JamesPlusPlus
http://phoenix-hbase.blogspot.com/

On 04/08/2013 11:30 AM, Graeme Wallace wrote:
> I thought a Scan could only cope with one start row and an end row ?
>
>
> On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
>> wrote:
>> Hi Greame,
>>
>> The scans are the right way to do that.
>>
>> They will give you back all the data you need, chunck by chunk. Then
>> yoiu have to iterate over the data to do what you want with it.
>>
>> What was your expectation? I'm not sure I'm getting your "so that i
>> dont have to issue sequential Scans".
>>
>> jM
>>
>> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
>>> Hi,
>>>
>>> Maybe there is an obvious way but i'm not seeing it.
>>>
>>> I have a need to query HBase for multiple chunks of data, that is
>> something
>>> equivalent to
>>>
>>> select columns
>>> from table
>>> where rowid between A and B
>>> or rowid between C and D
>>> or rowid between E and F
>>> etc.
>>>
>>> in SQL.
>>>
>>> Whats the best way to go about doing this so that i dont have to issue
>>> sequential Scans ?
>>>
>>> --
>>> Graeme Wallace
>>> CTO
>>> FareCompare.com
>>> O: 972 588 1414
>>> M: 214 681 9018
>
>


Re: Best way to query multiple sets of rows

Posted by Graeme Wallace <gr...@farecompare.com>.
I thought a Scan could only cope with one start row and an end row ?


On Mon, Apr 8, 2013 at 1:27 PM, Jean-Marc Spaggiari <jean-marc@spaggiari.org
> wrote:

> Hi Greame,
>
> The scans are the right way to do that.
>
> They will give you back all the data you need, chunck by chunk. Then
> yoiu have to iterate over the data to do what you want with it.
>
> What was your expectation? I'm not sure I'm getting your "so that i
> dont have to issue sequential Scans".
>
> jM
>
> 2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> > Hi,
> >
> > Maybe there is an obvious way but i'm not seeing it.
> >
> > I have a need to query HBase for multiple chunks of data, that is
> something
> > equivalent to
> >
> > select columns
> > from table
> > where rowid between A and B
> > or rowid between C and D
> > or rowid between E and F
> > etc.
> >
> > in SQL.
> >
> > Whats the best way to go about doing this so that i dont have to issue
> > sequential Scans ?
> >
> > --
> > Graeme Wallace
> > CTO
> > FareCompare.com
> > O: 972 588 1414
> > M: 214 681 9018
>



-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018

答复: Best way to query multiple sets of rows

Posted by Shixiaolong <sh...@huawei.com>.
Hi, Jean
   I guess Greame maybe asked whether Hbase can support parallel 
scan provided by client API, because currently, client API doesn't 
provide concurrent access if the range query crosses multi-regions?
  Now, if we want to support parallel scan, we have to use 
coprocessor to implement, whether it can be as built-in API, it
will be more friendly.

thanks
shixiaolong

-----邮件原件-----
发件人: Jean-Marc Spaggiari [mailto:jean-marc@spaggiari.org] 
发送时间: 2013年4月9日 2:28
收件人: user@hbase.apache.org
主题: Re: Best way to query multiple sets of rows

Hi Greame,

The scans are the right way to do that.

They will give you back all the data you need, chunck by chunk. Then
yoiu have to iterate over the data to do what you want with it.

What was your expectation? I'm not sure I'm getting your "so that i
dont have to issue sequential Scans".

jM

2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> Hi,
>
> Maybe there is an obvious way but i'm not seeing it.
>
> I have a need to query HBase for multiple chunks of data, that is something
> equivalent to
>
> select columns
> from table
> where rowid between A and B
> or rowid between C and D
> or rowid between E and F
> etc.
>
> in SQL.
>
> Whats the best way to go about doing this so that i dont have to issue
> sequential Scans ?
>
> --
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi Greame,

The scans are the right way to do that.

They will give you back all the data you need, chunck by chunk. Then
yoiu have to iterate over the data to do what you want with it.

What was your expectation? I'm not sure I'm getting your "so that i
dont have to issue sequential Scans".

jM

2013/4/8 Graeme Wallace <gr...@farecompare.com>:
> Hi,
>
> Maybe there is an obvious way but i'm not seeing it.
>
> I have a need to query HBase for multiple chunks of data, that is something
> equivalent to
>
> select columns
> from table
> where rowid between A and B
> or rowid between C and D
> or rowid between E and F
> etc.
>
> in SQL.
>
> Whats the best way to go about doing this so that i dont have to issue
> sequential Scans ?
>
> --
> Graeme Wallace
> CTO
> FareCompare.com
> O: 972 588 1414
> M: 214 681 9018

Re: Best way to query multiple sets of rows

Posted by lars hofhansl <la...@apache.org>.
We've had some discussions about turning a set of Gets into (smaller set of Scans). That is only partially applicable here, though.

In your case I think you have two options:
1. Fire off multiple scans. You can do that in parallel from the client. Each one will hone in to the start row with only a single seek.
2. Use a custom filter to do a skip scan. You'd pass that start/end keys to your filter and after each slice of rows provide a seek hint to the next slice. That way you can handle this with only a single scan, and just as many (initial) seeks needed as your number of slices.


#1 seems to be a fine option.


As James pointed out, Phoenix does this for you already (including multiple scans and the skip scan logic, whichever makes more sense in the situation).

-- Lars



________________________________
 From: Graeme Wallace <gr...@farecompare.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org> 
Sent: Monday, April 8, 2013 11:23 AM
Subject: Best way to query multiple sets of rows
 
Hi,

Maybe there is an obvious way but i'm not seeing it.

I have a need to query HBase for multiple chunks of data, that is something
equivalent to

select columns
from table
where rowid between A and B
or rowid between C and D
or rowid between E and F
etc.

in SQL.

Whats the best way to go about doing this so that i dont have to issue
sequential Scans ?

-- 
Graeme Wallace
CTO
FareCompare.com
O: 972 588 1414
M: 214 681 9018