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
97046
July 05, 2005 07:23PM
28702
July 05, 2005 07:37PM
22336
July 06, 2005 05:44AM
19228
July 07, 2005 06:13AM
17204
July 07, 2005 09:11AM
17238
July 07, 2005 10:48AM
9945
July 07, 2005 10:51AM
8776
July 08, 2005 05:27AM
9888
July 08, 2005 05:48AM
8081
August 19, 2005 05:22AM
8936
July 06, 2005 02:11AM
8269
July 06, 2005 05:33AM
Re: select count(distinct)
7283
July 06, 2005 06:13PM
7231
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.