Okay, I got the direct "skinny" this morning and found out that the
improvements of adding "Where 1=1" only works on a case-by-case basis.

Basically, as it was explained to me, "The query optimizer wasn't picking a
good execution plan.  The WHERE 1 = 1 made it choose index seek other than
the original.  I think it was about a factor of 5."

But it's not hard to at least try it and see what happens... might cut the
run time down a bit.

Hatton

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of C. Hatton Humphrey
> Sent: Friday, March 16, 2001 7:36 PM
> To: [EMAIL PROTECTED]
> Subject: RE: FW: LONG load times
>
>
> I'll e-mail him and ask for the exact number again, but the
> explanation was
> that with the statement in, SQL Server "optimizes" the execution
> path of the
> query.  I don't have access to the server right now, but I'll get more
> information on Monday.
>
> Hatton
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of David Sterling
> Sent: Friday, March 16, 2001 6:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: FW: LONG load times
>
>
> really....  care to expand on that....


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to