| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Checking if more than 0 rows exist.
phil_herring_at_yahoo.com.au wrote:
> Mark D Powell wrote:
>>Interesting that no one mentioned the exists clause. This is exactly >>what an exists subquery is for: test to see if some condition is true >>and by design the statements stops processing as soon as one hit is >>found.
Small observation: adding 'rownum = 1' actually *increases* the execution time. Not by enough to make much practical difference, but a degredation in performance nonetheless. I'm seeing the same phenomonon now that I'm actually testing it (as opposed to just shooting my mouth off).
Your broader point - that 'exists' is much faster - is certainly the case.
-- //-WaltReceived on Tue May 10 2005 - 10:36:24 CDT
![]() |
![]() |