Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 9.2.0.1.0 For Windows performance question
On 23 Aug 2003 09:11:39 -0700, grzybek_at_mikrus.pw.edu.pl (Aguyngueran)
wrote:
>> SELECT
>> kod_w || kod_p || kod_g || rodzaj_g, sum(decode(e,'N',1,0)) N,
>> sum(decode(e,'U',1,0) U -- etc
>> from tabelka
>> group by kod_w ||kod_p||kod_g||rodzaj_g
>>
>> and you can throw away the trash you are using now.
>>
>Thank You very much. I didn't know about DECODE function.
>But what about SELECT count(*) from TABELKA; It takes quite long time
The duration of a count(*) is dependent of the size of the table and
the location of High Water Mark. If you have a table of 1000 blocks,
and 0 records, but the High Water Mark is at block 995, all 995
blocks will be read.
Also your db_file_multiblock_read_count may be inadequate per se, or
be inadequate compared to the size of a single extent of your table
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Sat Aug 23 2003 - 13:11:36 CDT