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 ar
Maciej Blizinski wrote:
> I'd like to suggest alternative SQL solution which performs better.
> With my example database Malcolm's query takes 214ms to execute, while
> my query does the same job in 5.8ms, which is 36 times faster.
>
> My solution is described here:
> http://groups.google.com/grou
Malcolm Tredinnick wrote:
> At the moment, you need to write some custom SQL to implement this. One
> possible solution is here:
> http://www.pointy-stick.com/blog/2006/06/14/custom-sql-django/
hi Malcolm,
sorry I missed your link, I just look into your doc & code, pretty much
the same as my fri
On Sun, 2006-07-23 at 22:09 +1000, Malcolm Tredinnick wrote:
> Whilst your suggestion is slightly faster for smaller cases, the problem
> is that it doesn't scale quite as well: there is an upper limit for the
> number of joins a database can do, for example.
For list-wise scaling, yes. I've once
On Sun, 2006-07-23 at 13:03 +0200, Maciej Bliziński wrote:
> Hi Eric and Malcolm,
>
> On Sun, 2006-07-23 at 17:53 +1000, Malcolm Tredinnick wrote:
> > At the moment, you need to write some custom SQL to implement this. One
> > possible solution is here:
> > http://www.pointy-stick.com/blog/2006/0
Hi Eric and Malcolm,
On Sun, 2006-07-23 at 17:53 +1000, Malcolm Tredinnick wrote:
> At the moment, you need to write some custom SQL to implement this. One
> possible solution is here:
> http://www.pointy-stick.com/blog/2006/06/14/custom-sql-django/
I'd like to suggest alternative SQL solution w
o, the count(*) is unnecessary,
select object_id from tagging_object_tag where tag_id in (15,
16) group by object_id having count(*)=2;
;)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
hi Malcolm,
thank you very much for your quick reply!
I knew I need to build my custom SQL, my friend (who is a db master :)
just came back and suggests me to do this:
select object_id, count(*) from tagging_object_tag where tag_id in (15,
16) group by object_id having count(*)=2;
pretty cool
Hi Eric,
On Sun, 2006-07-23 at 07:26 +, nkeric wrote:
> hi all,
>
> I have a m2m table recording object & it's tags, here is part of the
> table data:
>
> object_idtag_id
> 115
> 116
> 215
> 316
> 415
> 4
hi all,
I have a m2m table recording object & it's tags, here is part of the
table data:
object_idtag_id
115
116
215
316
415
416
417
I would like to select object_ids where tag_id
10 matches
Mail list logo