[development] Drupal.org slow queries analyzed with explain: CVS
kieran at civicspacelabs.org
Mon Jul 31 21:57:22 UTC 2006
On Jul 30, 2006, at 9:41 PM, Kieran Lal wrote:
> mysql> EXPLAIN SELECT DISTINCT m.*, r.*, u.name, u.uid FROM
> cvs_messages m INNER JOIN cvs_repositories r ON m.rid = r.rid
> INNER JOIN users u ON m.uid = u.uid ORDER BY m.created
Here's what I think is happening.
cvs_messages has 25K rows and is joining on cvs_repositories which
has two rows, one for core and one for contrib.
Then that is joined against users table which has approximately 80K
25K joined on 2 joined on 80K. I am wondering if we can just get
the values from the cvs_repositories into a PHP array and then join
cvs_messages to users on uid. Any ideas would be welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development