Search Postgresql Archives

disk writes within a transaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone enlighten me to how postgres handles disk writing?  I've read some generic remarks about buffers, but that's about it.

We have a chunk of code that calls Postgres in a less-than-optimal way within a transaction block.  I'm wondering where to prioritize fixing it, as the traffic on the wire isn't an issue.

Basically the code looks like this:

	begin;
	update foo set foo.a='1' where foo.bar = 1;
	...
	update foo set foo.b='2' where foo.bar = 1;
	...
	update foo set foo.c='3' where foo.bar = 1;
	commit;

If the updates are likely to be a memory based operation, consolidating them can wait.  If they are likely to hit the disk, I should schedule refactoring this code sooner than later.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux