Posted by David Strauss on May 19, 2008 at 10:10pm
5 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | base system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | David Strauss |
| Status: | closed (duplicate) |
Issue Summary
The COUNT query in path.inc runs fine on MyISAM because MyISAM keeps track of the total rows in each table. InnoDB must count all rows.
Fortunately, we don't need to count all of them. We just need to know if there's at least one.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| better_path_count.patch | 476 bytes | Ignored: Check issue status. | None | None |
Comments
#1
#2
Here's a D6 version.
#3
Just checked, this is "fixed" in Drupal 7 by virtue of not running such a check at all.
#4
Whoops, my later comment overwrote webchick's status change.
#5
Updated patches.
#6
Account for possibility of "" and "0" as paths.
#7
$count is no longer an accurate name for the variable. I would rename it to $has_paths with a boolean value. The ternary operator and '> 0' can be removed.
#8
Updated patches to include drumm's suggestions.
#9
Ignore those last patches. I need to handle a regression in "0" and "" path handling.
#10
I meant keep the !== FALSE, but remove the redundant ternary.
#11
@drumm Yes, I realized that. That's why I said my last post was bad.
#12
Duplicate of #196862: COUNT(*) is an expensive query in InnoDB.