- Steve Howard <[EMAIL PROTECTED]> on 07/07/01 17:54:18 -0500: > do a > SELECT COUNT(*) FROM <tablename> WHERE ... > > A count is almost always faster than actually returning that row, and > requires even less network bandwidth to return the result. Of course, it a > result of 1 is returned - the row exists. Don't try this in Oracle, it immediately degenerates into a table scan. MySql may handle this differently but selecting the key (or the first field with restriction on the PK) will be equally fast w/o fewer risks. sl
- Checking for the existence of a certain row. James Kufrovich
- Re: Checking for the existence of a certain row. Mark Thornber
- Re: Checking for the existence of a certain row. Steven Lembark
- RE: Checking for the existence of a certain row. Steve Howard
- Re: Checking for the existence of a certain row. Steven Lembark
- Re: Checking for the existence of a certain row... Peter J . Holzer
- Re: Checking for the existence of a certain row. Thomas A . Lowery
- RE: Checking for the existence of a certain row. Tim Harsch
- RE: Checking for the existence of a certain row. Steve Howard
- Re: Checking for the existence of a certain row. M.W. Koskamp
- Re: Checking for the existence of a certain row... James Kufrovich
- Re: Checking for the existence of a certain row. Thomas A . Lowery
- RE: Checking for the existence of a certain row. Tim Harsch
- Re: Checking for the existence of a certain row. Michael A. Chase
