Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Tunning
In article <94nos9$3qf$1_at_nnrp1.deja.com>,
bblfree_at_my-deja.com wrote:
> Hi,
> we're starting tunning for the provider application and we've a doubt.
> When a "select count(*) " sentence generally returns zero, how will be
> the performance over a large table?
IMHO for a big table the performance will suck big time. If you use
Select count(*)
from my_very_own_table
where some_column = some_value
To determine whether you have anything in the table that satisfies the condition in the were clause, use the flw. instead:
Select some_column
into dummy_variable
from my_very_own_table
where some_column = some_value
AND ROWNUM=1
This is a much better way to answer the question "Do we have anything
there already?" from the performance point of view.
Regards,
Max
Sent via Deja.com
http://www.deja.com/
Received on Wed Jan 24 2001 - 18:35:13 CST