- 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

Reply via email to