Re: high transaction rate - Mailing list pgsql-general

From John R Pierce
Subject Re: high transaction rate
Date
Msg-id ce503a96-f7e1-e1f7-e906-e04b2c443161@hogranch.com
Whole thread Raw
In response to Re: high transaction rate  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: high transaction rate
List pgsql-general
On 12/7/2016 8:47 AM, Rob Sargent wrote:
> Please tell me that in this case, updating 2 (big)integer columns does
> not generate dead tuples (i.e. does not involve a insert/delete pair).

if the fields being updated aren't indexed, and there's free tuple space
that has already been vacuumed in the same block, then the update is
done via "HOT" (or is it HEAT?) within the same block... but with 1000s
of updates per second to the same 500 rows ?  odds of autovacuum keeping
up are sketchy..    otherwise, all updates are insert/delete operations
due to the requirements of MVCC

a SQL database may not really be the best way to do what you're
doing.    an array of your 500 rows, updated in memory, with updates
logged to a transaction file and the whole array periodically written to
disk, would very likely be MUCH higher performance..


--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: high transaction rate
Next
From: Joseph Brenner
Date:
Subject: Re: [HACKERS] Select works only when connected from login postgres