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));
CommentFileSizeAuthor
sql_count_bad.patch1.33 KBGrayside
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gobinathm’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes
Status: Needs review » Patch (to be ported)

Needs to be reviewed if this is something that's required for newer versions

mikhailkrainiuk’s picture

Status: Patch (to be ported) » Closed (outdated)

Hello!

Thank you for the issue, but we don't have "COUNT(*)" requests in 7.x-3.x version now.

mikhailkrainiuk’s picture

Status: Closed (outdated) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.