Re: performance is slow
Al Niessner <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <1244658497.4273.65.camel@charon> |
I am kind of in the middle of those changes now. While it is completely broken at the current moment, I am noticing that the few commits it is doing seem much faster. I have to get it fully functional before I can quantify how much better it is though. On Wed, 2009-06-10 at 11:17 -0700, Tim Roberts wrote: > Al Niessner wrote: > > The main thing that I think I am doing wrong that I want to change is > > that I am doing a commit after after insert. I am looking at changing > > that to a bigger more "transactional" item. Not sure if this will > > improve the overall time, but it seems like a more DB way of doing > > things. > > > > That is the key right there. If you change your code so that you do not > commit until your whole series of inserts and updates is complete, > you'll find that the performance is quite acceptable. > -- Al Niessner I have never found the companion that was so companionable as solitude. - From Walden by Henry David Thoreau The universe is indifferent, and life is brutal; however, it is man's choice of behavior that makes them malevolent rather than benevolent. Some will fall in love with life and drink it from a fountain That is pouring like an avalanche coming down the mountain. - From the song Pepper by the Butthole Surfers