WHERE 1=2 with performance nightmares
- From: Sarah <SarahBram@xxxxxxxxxxx>
- Date: Wed, 01 Aug 2007 12:46:45 -0500
Recently we started seeing this "WHERE 1=2" in sql profiler trace that even makes a lot of our sql statements invalid when there is *already* a WHERE clause in our sql.
Here is an example copied from a trace file:
SET FMTONLY ON SELECT Col1,Col2 from Table1 WHERE Col1 = 8 and Col2 = 6
WHERE 1=2 SET FMTONLY OFF
The actual sql we wrote inside the executable for this example is:
SELECT Col1,Col2 from Table1 WHERE Col1 = 8 and Col2 = 6
Btw, some of our guys have recently tried replication feature with our servers. Has that turned on some kind of server setting that cause all this?
The reason we started worrying about this is, we are experiencing performance issues like timeouts, connection losses etc.,
Thanks in advance,
Sarah
D7 + SQL Server 2000/2005
ADO with Provider=SQLOLEDB.1
.
- Follow-Ups:
- Re: WHERE 1=2 with performance nightmares
- From: Marius Andresen
- Re: WHERE 1=2 with performance nightmares
- From: Kim Madsen
- Re: WHERE 1=2 with performance nightmares
- From: Ralf Jansen
- Re: WHERE 1=2 with performance nightmares
- Prev by Date: Re: D2007 Help issue
- Next by Date: Re: Screen size
- Previous by thread: Can a VS .Net component be used in Delphi VCL application
- Next by thread: Re: WHERE 1=2 with performance nightmares
- Index(es):
Relevant Pages
|