Re: select count(distinct)
Looks like doing the similar steps.
Did you run it multiple times to confirm?
Maybe the index has been cached the first time, so the second query is much faster since it does not read the index from the disk. Just a guess.
Try running the select distinct ... 2 times in a row and see if any difference.
You can simplify the sum with
select sum(1) from table group by col1
Subject
Views
Written By
Posted
97285
July 05, 2005 07:23PM
28753
July 05, 2005 07:37PM
22382
July 06, 2005 05:44AM
19283
July 07, 2005 06:13AM
17253
July 07, 2005 09:11AM
17299
July 07, 2005 10:48AM
9991
July 07, 2005 10:51AM
8816
July 08, 2005 05:27AM
9921
July 08, 2005 05:48AM
8111
August 19, 2005 05:22AM
8979
July 06, 2005 02:11AM
8305
July 06, 2005 05:33AM
Re: select count(distinct)
7327
July 06, 2005 06:13PM
7265
July 07, 2005 05:14AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.