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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Really weird question

Re: Really weird question

From: Xavier Neys <xavier.neys_at_12move.nl>
Date: Thu, 16 Aug 2001 23:54:27 +0200
Message-ID: <9lhf5a$e6g$1@news1.xs4all.nl>


Marg,

Have you had a look at an explain plan ? My wild guess is that Oracle is using an index in the first two queries and not in the third. That would mean there is an index on col1,col2 in which case Oracle is not reading the table data blocks, it merely does a full index scan, but on the third query, Oracle does a full table scan.

Anyway, the only way to have control over the records sequence is to use an order by clause, obviously.

Hope this helps,

Today, Tomorrow, Together
The DOC
(The Dutch Oracle Company)

Xavier.

"Margaret Burwell" <aj739_at_FreeNet.Carleton.CA> wrote in message news:9lh66g$ovt$1_at_freenet9.carleton.ca...
>
> I have a table with approximately 6000 rows in an 8.1.7 database on an HP
> UX server.
>
> I run a query SELECT COL1 FROM TABLE1;
>
> Then I run a new query SELECT COL1, COL2 FROM TABLE1;
> The rows are in exactly the same order as when I ran the first query.
>
> Next I run the query SELECT COL1, COL2, COL3 FROM TABLE1;
> The rows are no longer in the same order.
>
> Does anyone have an explanation of why this happens?
>
> Marg
Received on Thu Aug 16 2001 - 16:54:27 CDT

Original text of this message

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