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 -> count(distinct) and SORT_AREA_SIZE

count(distinct) and SORT_AREA_SIZE

From: R T <rthumsi_at_hotmail.com>
Date: 30 Sep 2001 12:45:22 -0700
Message-ID: <94f01c2b.0109301145.1eda57b5@posting.google.com>


In the select statement
select count(distinct col1), count(distinct col2), count(distinct col3),... count(distinct col25)
from table;

How many sorts are performed? If I set the event 10032, it shows only 1 sort. It shows the total number of input records as sum of all the non-null column values. If so, does it do a single sort by prefixing with column id or column position and sort. Won't it increase the complexity of the sort? Or for a select with 25 columns, does it do 25 sorts simultaneously? If that is the case SORT_AREA_SIZE being a fixed size how does it use it effectively? Idea is to come up with a correct value for SORT_AREA_SIZE parameter. Received on Sun Sep 30 2001 - 14:45:22 CDT

Original text of this message

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