Re: orm: delete performance and queries optimization

2009-01-09 Thread Malcolm Tredinnick
On Fri, 2009-01-09 at 00:33 -0800, drakkan wrote: [...] > consider that other orm such sqlalchemy (with the right configuration) > can manage the mass delete without problems (tested on postgres), the > trick is to allow control on the database cascade behaivour, I > understand you are not

Re: orm: delete performance and queries optimization

2009-01-09 Thread drakkan
Thanks for the answer, I already solved the problem using raw sql and reconfiguring postgres with on delete cascade on relevant foreign key (obviously this doesn't work with mysql and myisam), my database can seems slow but consider I have about 20.000.000 records on some tables and I tested a

Re: orm: delete performance and queries optimization

2009-01-08 Thread Malcolm Tredinnick
On Thu, 2009-01-08 at 04:54 -0800, drakkan wrote: > In my database I have some tables full of records, when I delete an > object django use the cascade behaviour and this is good, however > seems it make a query for every related object and after this django > seems to issue a delete where id in

orm: delete performance and queries optimization

2009-01-08 Thread drakkan
In my database I have some tables full of records, when I delete an object django use the cascade behaviour and this is good, however seems it make a query for every related object and after this django seems to issue a delete where id in () for every 100 objects look at this, Oggetti returns