Re: slooow delete

John Lenton <[email protected]> Wed, 9 Mar 2005 12:55:24 -0300
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
On 05 Mar 2005 16:31:38 +0100, Sebastien Bigaret
<[email protected]> wrote:
> 
> 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()

instead of the print I did

    print >> sys.stderr, '***', pprint.pformat(ec.currentStateSummary())

and here is the output:

*** {'auto_insertion': 0,
 'deleted': 0,
 'inserted': 0,
 'nb_objects': 2311,
 'pending_deleted': 1,
 'pending_inserted': 0,
 'pending_updated': 2,
 'time': 1110383332.976902,
 'updated': 0}
*** {'auto_insertion': 0,
 'deleted': 1,
 'inserted': 0,
 'nb_objects': 21184,
 'pending_deleted': 0,
 'pending_inserted': 0,
 'pending_updated': 0,
 'time': 1110383439.4831209,
 'updated': 3}
*** {'auto_insertion': 0,
 'deleted': 0,
 'inserted': 0,
 'nb_objects': 21183,
 'pending_deleted': 0,
 'pending_inserted': 0,
 'pending_updated': 0,
 'time': 1110383446.224946,
 'updated': 0}

-- 
John Lenton ([email protected]) -- Random fortune:
Don't anthropomorphise computers and cars, They hate that.


-------------------------------------------------------
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