Closed (works as designed)
Project:
Tagadelic
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2007 at 10:51 UTC
Updated:
1 May 2008 at 13:10 UTC
When grouping why are you grouping by so many fields? Specifically this line...
$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);
I believe that if you group by only d.tid, the query runs about 5-6x faster... In fact the field which is slowing it down most is d.name. I ran a slightly modified version of that query and my development server took about 900ms. By removing the d.name field it took only 150ms.
Comments
Comment #1
Bèr Kessels commentedSounds interesting.
The reason for group by name is because names are not unique. We'd want to avoid a certain word to appear more then once in the cloud, not?
Can you please file a patch here, so that we can evaluate it?
Comment #2
Bèr Kessels commentedLeaving this by design.