Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I selec rows in physical order?
Sergey!
Rows returned by "select" always(!) in rownum order - rownum is a "row
number". So you can always use
select * from any table where rownum<0 Or add some filter to select more deeply.
On Thu, 22 Jun 2000 20:15:20 GMT, sergey s_at_my-deja.com wrote:
>I am trying to go against a 2.5 billion row table and get a sample for
>some testing (maybe about a 100 rows). I wanted to get the first 100
>rows and get them fast. The table is partitioned, there are some bitmap
>indexes, but getting stuff out of the table is not quick. I guess I can
>use hints (like FIRST ROWS or something), but I don't know how much of
>an improvement in speed that will create. ROWNUM doesn't help in this
>situation because the rows are not in the rownum order, and going
>that route with 2.5 billion row table - you get tired of waiting.
>
>So, that's where I am coming from. Hope this clarifies things.
>
>Thank you for your help!
>
>Sergey
>
>In article <395257A9.E729E0A_at_euclidsys.com>,
> Randy DeWoolfson <randy_at_euclidsys.com> wrote:
>> if you do a select without any order by clause then you will get the
>> rows as retrieved from the tablespace - is this what you mean by
>> physical order?
>>
>> It would be a real chore (i think) to decode the ROWID psuedocolumn
into
>> some disk mapping of sectors (blocks really) and then order those
>> somehow within tablespaces...
>>
>> hope this helps.
>> randy
>>
>> sergey s_at_my-deja.com wrote:
>>
>> > Does ROWNUM guarantee physical order of the rows in a table?
>> > If not, how can I get rows out in their physical order?
>> >
>> > Thanks!
>> >
>> > Sergey
>> >
>> > Sent via Deja.com http://www.deja.com/
>> > Before you buy.
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.