Re: UPDATE syntax question

From: Ross Presser (rpresser_at_imtek.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 10:34:39 -0500

On Tue, 15 Feb 2005 17:26:56 -0500, Mike W wrote:

> How about in an EXISTS clause?
>
> "Gert-Jan Strik" <sorry@toomuchspamalready.nl> wrote in message
> news:42126FB3.F2444DAE@toomuchspamalready.nl...
>> Using "SELECT 1" or "SELECT *" in a (NOT) EXISTS clause does not matter.
>> Their performance is identical.
>>
>> Gert-Jan

Specifically in an EXISTS clause, the optimizer will just test for the
existence of any rows, and not worry about what columns were specified.



Relevant Pages

  • Re: CLUSTERD INDEXES
    ... ORDER BY clause and the clustered index both specify the same order. ... > optimizer to include a Sort operator in the execution plan, ...
    (microsoft.public.sqlserver.programming)
  • Re: Hacme Bank
    ... aggregate function and there is no GROUP BY clause. ... IF YOU WORRY YOU MAKE IT DOUBLE, ... Ethical Hacking at the InfoSec Institute. ...
    (Pen-Test)
  • Re: Tandem SQL question
    ... So you're interested in its existence. ... then a good optimizer will take a pessimistic ... SQL has much more efficient data ... I was sure that you could limit NS COBOL SQL to how many rows it found ...
    (comp.sys.tandem)
  • Re: Query tuning
    ... This query is too complex for the optimizer for the following reasons: ... - It can't use any index on T_CDO_RXLINK.CID because of the IN clause. ... The fields RxSource and RxTarget have nonclustered indexes. ...
    (microsoft.public.sqlserver.clients)
  • Re: Performance : Queries taking very long time (Urgent)
    ... David is correct,.... ... optimizer is unable to use index statistics to determine the best index. ... Pre-determining the date ranges as David suggests will give the optimizer ... number of rows that satisfy the where clause... ...
    (microsoft.public.sqlserver.server)