From: Raphael Bauduin <raphael@be.easynet.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Raphael Bauduin <raphael@be.easynet.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: performance "tests"
Date: Thu, 11 Apr 2002 17:30:21 +0200
Message-ID: <20020411153021.GA25256@raphael> (raw)
In-Reply-To: <895.1018535680@sss.pgh.pa.us>
References: <20020410130046.GB8153@raphael>
<5607.1018453023@sss.pgh.pa.us>
<20020411134256.GA28547@raphael>
<895.1018535680@sss.pgh.pa.us>
On Thu, Apr 11, 2002 at 10:34:40AM -0400, Tom Lane wrote:
> Raphael Bauduin <raphael.bauduin@be.easynet.net> writes:
> > I just installed 7.2.1. I run 7.1.3 in parallel. after I run the script
> > to introduce 1000 rows in T1 in each version, deleting is much faster
> > with 7.1.3 than with 7.2.1 (I took the same configuration parameters for
> > both servers...). When running the delete query in parallel, 7.1.3
> > finishes really faster.
>
> Uh, what was the test query again? And what does EXPLAIN say about it
> on each version?
I just want to delete all rows in the table T1. As all other tables have
foreign keys coming from T1, all rows in all tables are deleted.
For example, from T1:
test=# select * from T1 where k1>50 and k1< 55;
k1 | k2 | k3 | k4 | k5
----+----+----+----+----
51 | 3 | 42 | 26 | 7
52 | 15 | 32 | 35 | 2
53 | 4 | 8 | 11 | 12
54 | 3 | 33 | 38 | 26
(4 rows)
for Tj, kj is primary key.
for 0<i<j<5, Tj has a foreign key coming (ki) from Ti (ki, which is
also primary key of Ti)
so, Tj has j-1 foreign keys (T2 has one from T1, T3 has 2: from T1 and
T2,....)
All tables don't have the same number of rows, but it's more or less the same
(rows are inserted randomly in the tables)
From 7.1.3:
test=# select count(*) from T1;
count
-------
1000
(1 row)
test=# explain delete from T1;
NOTICE: QUERY PLAN:
Seq Scan on t1 (cost=0.00..20.00 rows=1000 width=6)
EXPLAIN
From 7.2.1:
test=# select count(*) from T1;
count
-------
1000
(1 row)
test=# explain delete from T1;
NOTICE: QUERY PLAN:
Seq Scan on t1 (cost=0.00..20.00 rows=1000 width=6)
EXPLAIN
So it says exactly the same.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: raphael@be.easynet.net, tgl@sss.pgh.pa.us
Subject: Re: performance "tests"
In-Reply-To: <20020411153021.GA25256@raphael>
References: <20020410130046.GB8153@raphael> <5607.1018453023@sss.pgh.pa.us> <20020411134256.GA28547@raphael> <895.1018535680@sss.pgh.pa.us> <20020411153021.GA25256@raphael>
* 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