[development] Drupalized Movielens 1 million votes -- need speed help

Scott Reynolds sdrreynolds at gmail.com
Sat Jul 22 17:24:45 UTC 2006


Hello,

I have taken the time to drupalize movelens 1 million vote database. I am
using it to test my recommendation engine. http://drupal.org/project/cre

You can find the drupalized stuff and the java program that created it in my
sandbox contrib/sandbox/scottreynolds

I am posting here because, as one would expect, it takes awhile to query the
database. Looking for ideas on how to speed it up. Here is the query that
selects the recommended content.

$db_result = db_query("SELECT d.content_id1 as 'content_id',
sum(d.sum+d.count*r.value)/sum(d.count) as 'score'
      FROM {votingapi_vote} r, {cre_similarity_matrix} d
      WHERE r.uid=%d AND d.content_id1<>r.content_id AND
d.content_id2=r.content_id
      AND d.content_type1='%s' AND d.content_type2=d.content_type1 AND
r.tag='%s'
      GROUP BY d.content_id1 ORDER BY score DESC",$uid,$target_type,$tag);

If you would like to get involved in the project or follow my progress or
whatever ( i love to generate more interest) join my groups page:
http://groups.drupal.org/soc-content-recommedation-engine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060722/1df86ae6/attachment.htm


More information about the development mailing list