Re: Bulk delete - performance / object collection

2013-01-02 Thread akaariai
A note about the upcoming 1.5: The delete() was optimized so that it doesn't fetch the objects if it doesn't have to. The "doesn't have to" translates to: - no delete signals defined for the model - no cascades That being said using DSE might be the right choice for you. - Anssi On 2 tammi, 1

Re: Bulk delete - performance / object collection

2013-01-02 Thread George Lund
Thank you very much for this. I'll catch up with those threads and read more about DSE, which looks really interesting work. regards George On Wednesday, 2 January 2013 11:50:54 UTC, Cal Leeming [Simplicity Media Ltd] wrote: > > Hi George, > > This is one area I spent quite a lot of time in pe

Re: Bulk delete - performance / object collection

2013-01-02 Thread George Lund
> > > Meanwhile I can construct the SQL by hand easily enough, but I feel this > > isn't doing things the right way. > > I've had this discussion with other developers. Many feel they need to > slavishly adhere to the ORM and if you don't you're some type of evil > entity. I could not disagree

Re: Bulk delete - performance / object collection

2013-01-02 Thread Cal Leeming [Simplicity Media Ltd]
That's an interesting perspective actually.. "Don't be a slave of your mind (or ORM)" Cal On Wed, Jan 2, 2013 at 12:01 PM, Larry Martell wrote: > On Wed, Jan 2, 2013 at 4:29 AM, George Lund wrote: > > I'm trying to bulk-delete several million rows from my database. > > > > The docs for Django

Re: Bulk delete - performance / object collection

2013-01-02 Thread Larry Martell
On Wed, Jan 2, 2013 at 4:29 AM, George Lund wrote: > I'm trying to bulk-delete several million rows from my database. > > The docs for Django 1.3 say "this will, whenever possible, be executed > purely in SQL". A pure-SQL delete is what I want in this case, so that's > fine. > > However, the code

Re: Bulk delete - performance / object collection

2013-01-02 Thread Cal Leeming [Simplicity Media Ltd]
Hi George, This is one area I spent quite a lot of time in personally, see; https://groups.google.com/forum/?fromgroups=#!msg/django-users/iRhWD0FtW8k/0KAMF3ub-ZYJ https://groups.google.com/forum/#!topic/django-users/hgLrwMoFLII Bulk operations using the ORM isn't always the right thing to do - a

Bulk delete - performance / object collection

2013-01-02 Thread George Lund
I'm trying to bulk-delete several million rows from my database. The docs for Django 1.3say "this will, whenever possible, be executed purely in SQL". A pure-SQL delete is what I want in this case, so that's fine. Howev