Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I selec rows in physical order?

Re: How can I selec rows in physical order?

From: Azamat Khalilov <aza_at_nospam.ru>
Date: 2000/06/23
Message-ID: <19g6lsg1v2kumr62ci2med2b0ghboodveo@4ax.com>#1/1

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.

Received on Fri Jun 23 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US