From: Chris Hoover <revoohc@gmail.com>
To: pgsql-admin@postgresql.org Admin <pgsql-admin@postgresql.org>
Subject: Help calculating load values
Date: Wed, 6 Feb 2008 12:44:34 -0500
Message-ID: <1d219a6f0802060944s55c3a5cbw61cf99010c2f863a@mail.gmail.com> (raw)
I need some help calculating how much activity a query causes.
If I have a table defined as:
create table test_a (
col1 integer,
col2 char(1),
col3 varchar(35),
primary key (col1,col2)
) with oids;
When I do an "insert into test_a values (1,'a','test data');", does this
generate 3 writes (1 to table, 1 to index, and one to oid counter) and one
read (get oid from oid counter)?
What about when I do an "update test_a set col3='changed data' where col1 =
1 and col2 = 'a';"? I am thinking 5 writes (1 to old table tuple, 1 to old
index tuple, 1 to oid counter, 1 to new table tuple, one to new index tuple)
with 1 read (get oid from oid counter)?
Finally, what about the delete "delete from test_a where col1=1 and
col2='a';"? 2 writes (1 to table tuple, and 1 to index tuple)?
I am just trying to get a grasp on how much traffic I am creating for each
major dml statement we issue so that I can work with my sysadmin on some i/o
issues.
Thanks,
Chris
PG 8.1
RH 4
--
Come see how to SAVE money on fuel, decrease harmful emissions, and even
make MONEY. Visit http://colafuelguy.mybpi.com and join the revolution!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: revoohc@gmail.com
Subject: Re: Help calculating load values
In-Reply-To: <1d219a6f0802060944s55c3a5cbw61cf99010c2f863a@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox