Redundant select on QuerySet delete/update

2009-02-05 Thread George Sakkis
Hello, I am looking at the raw sql executed when I run a delete or update on a QuerySet and it appears that it does a redundant "select *" for the queryset before the actual delete/update. For example delete_ids = (108, 107, 106) qs = MyModel.objects.filter(pk__in=delete_ids) print connection.qu

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis wrote: > > Hello, > > I am looking at the raw sql executed when I run a delete or update on > a QuerySet and it appears that it does a redundant "select *" for the > queryset before the actual delete/update. For example > > delete_ids = (108, 107, 106)

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread George Sakkis
On Feb 5, 3:13 pm, Alex Gaynor wrote: > On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis wrote: > > > > > > > Hello, > > > I am looking at the raw sql executed when I run a delete or update on > > a QuerySet and it appears that it does a redundant "select *" for the > > queryset before the actual de

Re: Redundant select on QuerySet delete/update

2009-02-05 Thread Alex Gaynor
On Thu, Feb 5, 2009 at 3:24 PM, George Sakkis wrote: > > On Feb 5, 3:13 pm, Alex Gaynor wrote: > > On Thu, Feb 5, 2009 at 3:09 PM, George Sakkis >wrote: > > > > > > > > > > > > > Hello, > > > > > I am looking at the raw sql executed when I run a delete or update on > > > a QuerySet and it appear