Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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));
Comment | File | Size | Author |
---|---|---|---|
cck.sql_count_bad.patch | 1.83 KB | Grayside |