Faster to get one row from DB or count number of rows

Posted by gX on Stack Overflow See other posts from Stack Overflow or by gX
Published on 2010-04-23T12:15:59Z Indexed on 2010/04/23 12:23 UTC
Read the original article Hit count: 171

Filed under:
|

Hi,

I was wondering if its faster to retrieve the "count" of the number of rows or to retrieve just 1 row using limit. The purpose being to see whether theres any row when given certain Where conditions.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql