Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Empty Table

Re: Empty Table

From: jaromir nemec <jaromir_at_db-nemec.com>
Date: Mon, 24 Jan 2005 23:28:36 +0100
Message-ID: <01d401c50264$0cd8ff20$3c02a8c0@JARAWIN>


Hi,

> add a where clause:
> WHERE rownum < 2;

this is in nearly all cases a very good approach, but there is a small but dangerous trap.

There is a constellation performing even with rownum < 2 a full scan of the total table. No, I don't mean the old joke with rownum > 2!

This case (true story) is documented in
http://www.db-nemec.com/Selecting_ROWNUM_1.html

Regards

Jaromir D.B. Nemec

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 24 2005 - 17:31:22 CST

Original text of this message

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