Re: performance "tests"

From: Raphael Bauduin <raphael(at)be(dot)easynet(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Raphael Bauduin <raphael(at)be(dot)easynet(dot)net>, pgsql-admin(at)postgresql(dot)org
Subject: Re: performance "tests"
Date: 2002-04-11 15:30:21
Message-ID: 20020411153021.GA25256@raphael
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Apr 11, 2002 at 10:34:40AM -0400, Tom Lane wrote:
> Raphael Bauduin <raphael(dot)bauduin(at)be(dot)easynet(dot)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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-04-11 22:02:23 Re: More question about plans & explain (long)
Previous Message Christian Gerdes 2002-04-11 15:07:11 Databases in memory (-->flashdrive problem)