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: query slower using order by asc (default index order) than oder by desc

Re: query slower using order by asc (default index order) than oder by desc

From: Chuck <skilover_nospam_at_bluebottle.com>
Date: Thu, 16 Feb 2006 17:46:51 GMT
Message-ID: <fU2Jf.4743$Fe.3333@trndny06>


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

Original text of this message

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