Posted by Steven Jones on November 30, 2010 at 2:08pm
4 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | forms system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | Performance |
Issue Summary
I'm a bit new to all this D7 stuff, but I was generating content using devel generate, and tried to create 500,000 items. It was taking a long time to complete, and so I investigated, and the line that was taking a long time to execute was:
<?php
class BatchQueue extends SystemQueue {
public function claimItem($lease_time = 0) {
$item = db_query('SELECT data, item_id FROM {queue} q WHERE name = :name ORDER BY item_id ASC', array(':name' => $this->name))->fetchObject();
?>Which was returning 500,000 rows from the db to just get the first one :( Sad times.
Patch on its way.
Comments
#1
Patch attached. Let's see what the testbot thinks.
#2
Ouch. Nice catch.
#3
D'oh! :)
Committed to HEAD. Thanks!
#4
Automatically closed -- issue fixed for 2 weeks with no activity.