From: | Doug McNaught <doug(at)wireboard(dot)com> |
---|---|
To: | Joseph Shraibman <jks(at)selectacast(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: max_expr_depth |
Date: | 2001-06-19 02:29:56 |
Message-ID: | m3n175b3rv.fsf@belphigor.mcnaught.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> Doug McNaught wrote:
> >
> > Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> >
> > > Compared to 1000 updates that took between 25 and 47 seconds, an update
> > > with 1000 itmes in the IN() took less than three seconds.
> >
> > Did you wrap the 1000 separate updates in a transaction?
> >
> > -Doug
>
> No, at a high level in my application I was calling the method to do the
> update. How would putting it in a transaction help?
If you don't, every update is its own transaction, and Postgres will
sync the disks (and wait for the sync to complete) after every one.
Doing N updates in one transaction will only sync after the whole
transaction is complete. Trust me; it's *way* faster.
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas T. Thai | 2001-06-19 02:33:42 | patent |
Previous Message | Joseph Shraibman | 2001-06-19 02:21:11 | Re: max_expr_depth |