[development] Drupal.org slow queries analyzed with explain: CVS
tables
Kieran Lal
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
users.
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.
Cheers,
Kieran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060731/5eca5973/attachment-0001.htm
More information about the development
mailing list