Re: 7.4beta2 vs 7.3.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 7.4beta2 vs 7.3.3
Date: 2003-09-19 22:26:09
Message-ID: 10234.1064010369@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> The select take long:
> Postgres7.3.3: average 4000 ms
> Postgres7.4b2: average 2600 ms
> you can experiment your self with the dump that I gave you

Hm. I tried to duplicate your results. I'm getting about 5400 msec
versus 4200 msec, which is a nice version-to-version improvement but
not as large as you're seeing. (I have --enable-cassert on, though,
and that may be cancelling some of the percentage gain.)

It looks like most of the speedup is in the seq scan step. I think
it is probably due to this change:

2003-02-03 10:07 tgl

* src/: backend/executor/execMain.c, backend/executor/execScan.c,
backend/executor/nodeIndexscan.c, backend/executor/nodeSeqscan.c,
backend/executor/nodeTidscan.c,
backend/optimizer/plan/createplan.c,
backend/optimizer/plan/planner.c, backend/optimizer/util/plancat.c,
backend/optimizer/util/relnode.c, include/executor/executor.h,
include/nodes/relation.h, include/optimizer/plancat.h: Tweak
planner and executor to avoid doing ExecProject() in table scan
nodes where it's not really necessary. In many cases where the
scan node is not the topmost plan node (eg, joins, aggregation),
it's possible to just return the table tuple directly instead of
generating an intermediate projection tuple. In preliminary
testing, this reduced the CPU time needed for 'SELECT COUNT(*) FROM
foo' by about 10%.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2003-09-19 23:06:55 Re: pgsql-server/src/backend catalog/index.c comma ...
Previous Message Joshua D. Drake 2003-09-19 21:49:49 PostgreSQL not ACID compliant?