Re: WHERE 1=2 with performance nightmares
- From: "Craig Stuntz [TeamB]" <craig_stuntz@xxxxxxxxxxxxx [a.k.a. acm.org]>
- Date: 2 Aug 2007 07:03:43 -0700
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
.
- Follow-Ups:
- Re: WHERE 1=2 with performance nightmares
- From: Arthur Hoornweg
- Re: WHERE 1=2 with performance nightmares
- From: Kim Madsen
- 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
- WHERE 1=2 with performance nightmares
- Prev by Date: Re: Screen size
- Next by Date: Re: Screen size
- Previous by thread: Re: WHERE 1=2 with performance nightmares
- Next by thread: Re: WHERE 1=2 with performance nightmares
- Index(es):