Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Index Ordered Table ordering
Ed Avis wrote:
> ed.prochak_at_magicinterface.com (Ed prochak) writes:
>
>
>>>I've got a table like this: >>> >>>CREATE TABLE prices ( >>> price integer, >>> id integer >>> CONSTRAINT prices_pri PRIMARY KEY ( price, id ) >>>) ORGANIZATION INDEX;
>>you shouldn't care until you query the data. Stop thinking of ORACLE >>as a file system and think in terms of tables (ie UNORDERED SETS of >>data). Besides your initial assumption is wrong. The indices do not >>have any special ordering.
>>Fact is, that index would work just fine for a query like: >> >>SELECT * FROM prices_pri >>WHERE price BETWEEN 0.01 AND 0.99 >>ORDER BY price DESC, id ;
-- Ed Prochak running http://www.faqs.org/faqs/running-faq/ netiquette http://www.psg.com/emily.html -- "Two roads diverged in a wood and I I took the one less travelled by and that has made all the difference." robert frostReceived on Mon Feb 09 2004 - 00:16:06 CST
![]() |
![]() |