Re: performance "tests" - Mailing list pgsql-admin

From Raphael Bauduin
Subject Re: performance "tests"
Date
Msg-id 20020411153021.GA25256@raphael
Whole thread Raw
In response to Re: performance "tests"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
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.




pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: performance "tests"
Next
From: Tom Lane
Date:
Subject: Re: More question about plans & explain (long)