Re: slooow delete

Sebastien Bigaret <[email protected]> 05 Mar 2005 16:31:38 +0100
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
        Hi John,


John Lenton <[email protected]> wrote:
> I have a table that has ~28k rows, and doing a simple
>=20
>   ec.delete(obj)
>   ec.saveChanges()
>=20
> takes about 60 seconds. This is for a web app, so the delay is way
> beyond what a user would find reasonable. Is there any way to speed
> this up?
> --=20
> John Lenton ([email protected]) -- Random fortune:
> Don't anthropomorphise computers and cars, They hate that.

That's waaaaayyy to slow, even for a regular app.  Before investigating
any further, could you integrate the following patch and send the result
of ec.currentStateSummary() just before the saveChanges()?  I'd like to
see whether this is actually the only change or not, and how much
objects are handled by the ec.

Even better, if you can, change ec.delete/ec.saveChange into:

  ec.delete(obj)
  print ec.currentStateSummary() # print it or log it if this is a web app
  ec.processRecentChanges()
  print ec.currentStateSummary()
  ec.saveChanges()
  print ec.currentStateSummary()


-- S=E9bastien.







-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click