Most performant alternative to SELECT COUNT(*) using PDO and MySQL

incubogr

New Member
I've read previously that \[code\]SELECT COUNT(*)\[/code\] is not performant in \[code\]MySQL\[/code\] and should be regularly avoided. (As a side question, is this only the case for a large number of rows?)I'm using \[code\]PHP Data Objects (PDO)\[/code\] to access \[code\]MySQL\[/code\].How should I be counting rows with performance considerations in mind?
 
Back
Top