You are here
Use of COUNT(*) in InnoDB is bad
See #196862: COUNT(*) is an expensive query in InnoDB..
There are three COUNT queries in CCK that are simple checks on whether "Stuff Exists". Best practice for a check like that is to use a query in the following form:
db_result(db_query_range("SELECT 1 ...", 0, 1));