Re: WHERE 1=2 with performance nightmares
- From: Kyle A. Miller <kyle@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 02 Aug 2007 12:46:10 -0500
Craig Stuntz [TeamB] expressed precisely :
Kim Madsen wrote:
Usually the expression compiler will evaluate the expression to be
false, even before actually searching records.
I know that to be false for InterBase. I expect that to be true for
any DB server which doesn't actually explicitly check for such
conditions. It is, generally speaking, a bad idea.
The Interbase needs a fix. In a simple where condition, like CustomerId=5, the database knows it needs to search the CustomerId field looking for the value 5. It should resolve the phrase before the search begins. It needs to know what to search for before it actually searches. No?
In "1=2", what is Interbase looking for? A column named "1" with a value of "2"? I don't know the innards of Interbase, but if it is designed this way, it seems flawed.
.
- Follow-Ups:
- Re: WHERE 1=2 with performance nightmares
- From: Craig Stuntz [TeamB]
- Re: WHERE 1=2 with performance nightmares
- References:
- WHERE 1=2 with performance nightmares
- From: Sarah
- Re: WHERE 1=2 with performance nightmares
- From: Kim Madsen
- Re: WHERE 1=2 with performance nightmares
- From: Craig Stuntz [TeamB]
- Re: WHERE 1=2 with performance nightmares
- From: Kim Madsen
- Re: WHERE 1=2 with performance nightmares
- From: Craig Stuntz [TeamB]
- WHERE 1=2 with performance nightmares
- Prev by Date: Re: WHERE 1=2 with performance nightmares
- Next by Date: Re: WHERE 1=2 with performance nightmares
- Previous by thread: Re: WHERE 1=2 with performance nightmares
- Next by thread: Re: WHERE 1=2 with performance nightmares
- Index(es):
Relevant Pages
|