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));
cck.sql_count_bad.patch1.83 KBGrayside
Members fund testing for the Drupal project. Drupal Association Learn more