Re: Physical sort of a table

From: Mike Rife <rife_at_aarlo.moffitt.usf.edu>
Date: 1995/07/03
Message-ID: <3t951a$8qi_at_mother.usf.edu>#1/1


In article <vkj.305.2FF02E9E_at_ctt.bellcore.com>, vkj_at_ctt.bellcore.com (Vinod Jain) says:
>
>Hi,
>
>I want to store a table physically sorted on certain columns so that I don't
>have to use 'order by' clause in my 'select ' queries. The 'select' query
>which I am trying to tune has joins with 2 more tables. Does primary key
>index sorts the table (like a clustered index in Sybase) ?
>
>Thanks,
>Vinod
>

You can store data in a table in a given order, but the only way to guarentee the order that the data is listed when SELECT'ed, is to use an ORDER BY clause. When you insert into a table, the records may or may not be stored sequentially. Even if they do, when the next database reorganization occurs, they again may or may not be in an kind of sorted order. Oracle does not guarentee order of storage, but if you use an ORDER BY, you can control the order that it is listed. Order may vary if no ORDER BY is used. Received on Mon Jul 03 1995 - 00:00:00 CEST

Original text of this message