Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: select * from <table_name> where 1=2
The 1=2 statement will return a false condition when oracle fetch record, so
oracle actually won't perform db get, no i/o, no performance issue.
The full scan is explained because this is only option, there is no index to use. Try explain select * from emp where empno=1 and 1=2, index search will return, but it make no difference in performance since no i/o is actually performed.
Anurag Minocha wrote:
> Hi,
> I am working on a java application and i have to caplture the table
> structure if the tables in my database by using select * from
> <tablename> where 1=2. But this is a fulltable scan.Is there any other
> method by which i can capture the table structures without doing a full
> table scan.I tried select * from <table_name> where rownum= -1.when i
> tried this with set timing on .This takes more time than select ...1=2..
> Please suggest some way.
>
> anurag
>
> reply at
> anurag_at_synergy-infotech.com
Received on Sat Jul 10 1999 - 10:32:34 CDT