Re: WHERE 1=2 with performance nightmares



Kim Madsen wrote:

Sounds like a where clause added by an api or middleware to get the
field definitions but not any records.

It's not a good idea to do it that way, since any DB without an
expression index or an explicit "optimization" for nonsense will do a
full table scan on that. It's a far better idea to use a random PK
value, since that gets you 0 or 1 records, if you must do it this way
instead of using the system tables.

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Borland newsgroup denizen Sergio González has a new CD of
Irish music out, and it's good: http://tinyurl.com/7hgfr
.