Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
See #196862: COUNT(*) is an expensive query in InnoDB..
There are two COUNT queries in Advanced Poll 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 |
---|---|---|---|
sql_count_bad.patch | 1.33 KB | Grayside | |
Comments
Comment #1
gobinathmNeeds to be reviewed if this is something that's required for newer versions
Comment #2
mikhailkrainiuk CreditAttribution: mikhailkrainiuk as a volunteer and at DrupalJedi commentedHello!
Thank you for the issue, but we don't have "COUNT(*)" requests in 7.x-3.x version now.
Comment #3
mikhailkrainiuk CreditAttribution: mikhailkrainiuk as a volunteer and at DrupalJedi commented