Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to optimize this query?
Billy Verreynne wrote:
> ed.prochak_at_magicinterface.com (Ed prochak) wrote
>
>
>>Billy, >> >>when testing for performance, don't use COUNT(). Make the query fetch >>rows. (COUNT() can be optimised such that no rows are fetched, making >>the query SEEM fast.)
My understanding is that the optimizer can decide that if it can answer COUNT(*) from table statistics, then it will do so. I hadn't thought about using it as a wrapper around the actual query. In that case you are right, cause there's no statistics for the optimizer to look at.
Thanks for point that out to me.
-- Edward J. Prochak --- Magic Interface, Ltd. Ofc: 440-498-3700 --- 7295 Popham Place, Solon, OH 44139 on the web at --- http://www.magicinterface.com email: ed.prochak_at_magicinterface.comReceived on Wed Aug 06 2003 - 05:44:28 CDT