Hello Malcolm, I've decided to take a closer look at the performance of both types of queries. I've made a benchmark and tested combinations of two tags of two different frequencies.
A statistical tool (R-project) was used to find a mathematical model of the query execution time. Conclusions are: Multi-join is at least as fast as one-join. Both one-join and multi-join queries perform similar with low-frequency tags (1%-5%). When at least one tag is becoming frequent (e.g. > 30% or > 50% frequency), the multi-join query is gaining more advantage. I've posted longer explanation and a plot on my blog: http://automatthias.wordpress.com/2006/07/23/malcolm-tredinnicks-sql-puzzle-solution/ Regards, Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---