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

Home -> Community -> Usenet -> c.d.o.server -> Re: Are the two SQLs equivalent?

Re: Are the two SQLs equivalent?

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Thu, 09 Jun 2005 03:34:46 GMT
Message-ID: <Xns966FD158ECA0SunnySD@68.6.19.6>


li.js_at_neusoft.com (Jinshan Li) wrote in
news:b60ce575.0506081746.4ac5e817_at_posting.google.com:

> Lee Fesperman <firstsql_at_ix.netcom.com> wrote in message
> news:<42A61E2E.21A_at_ix.netcom.com>... 

>> Bob Hairgrove wrote:
>> >
>> > On Tue, 07 Jun 2005 19:53:01 GMT, Lee Fesperman
>> > <firstsql_at_ix.netcom.com> wrote:
>> >
>> > >Lastly, when using EXISTS the preferred form for the SELECT clause
>> > >is 'SELECT *'. Unless the optimizer is crazy it should make no
>> > >difference and is clearer.
>> >
>> > In Oracle versions 8 or lower, 'SELECT 1 ...' was also recommended
>> > ... apparently, the server allocated memory for "*" columns or some
>> > such nonsense, requiring it to query the table definition, whereas
>> > with "SELECT 1" (or some other constant such as 'A') the engine
>> > didn't need to touch the table at all.
>>
>> Oh well ... those 'crazy' optimizers ;^) Of course, the other parts
>> of the query would also normally require accessing table definition
>> to some degree.
>>
>> Thanks for sharing.

>
> who can help me to optimize the sql 1?

Any consultant you are willing to pay. Received on Wed Jun 08 2005 - 22:34:46 CDT

Original text of this message

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