From: | Mats Lofkvist <mal(at)algonet(dot)se> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: _bt_check_unique checks every row in table when doing update?? |
Date: | 2002-09-10 07:36:29 |
Message-ID: | y2q7khue1oi.fsf@algonet.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) writes:
> Mats Lofkvist <mal(at)algonet(dot)se> writes:
> > But when doing ~1000 updates (i.e. setting val0 and val1 with
> > a where on an existing key0/key1/key2 triplet), I get this which
> > seems very strange to me:
>
> I suppose you repeatedly updated the same row 1000 times? That creates
> an O(N^2) behavior because the dead tuples have to be rechecked again
> and again.
>
> 7.3 will be smarter about this.
>
> regards, tom lane
Yes, I did update the same row so your explanation is correct.
(Note that I also read the data wrong, for some reason I read it
as 500k checks per 1 update, not per 1000 which made it look
a lot worse than it is.)
Thanks for the explanation, I'll try 7.3 beta to see how it
works there.
_
Mats Lofkvist
mal(at)algonet(dot)se
From | Date | Subject | |
---|---|---|---|
Next Message | Hamby, Mark CONTRACTOR HAMBYM | 2002-09-10 14:18:24 | Explicit timestamp conversion very slow |
Previous Message | Michael Fortin | 2002-09-10 06:16:07 | Re: make unsuccessful on mac os x 10.2 |