Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: query slower using order by asc (default index order) than oder by desc
VIC wrote:
> Scenario:
> Got a big normal(non-partition) table (about 5 million rows), only
> index is the default ascending primary key index on primary key column
> (id)
>
> Query 1.
> select * from contentowner2.system_log order by id asc
>
> Query 2.
> select * from contentowner2.system_log order by id desc
>
> Query 1 will take take more than 10 minutes to run
> Query 2 will take no more than a second to return result.
>
> Could anyone explain to me why query order by asc is so slow compared
> with query order by desc
>
> Thanks,
> Vic
>
What do the explain plans look like?
-- To reply by email remove "_nospam"Received on Thu Feb 16 2006 - 11:46:51 CST