Re: Performace question

From: "Lada 'Ray' Lostak" <ray(at)unreal64(dot)net>
To: "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performace question
Date: 2003-10-29 19:12:38
Message-ID: 016c01c39e50$9e6b24a0$0d01a8c0@utopia
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > >Secondly, the queries that are varying so much, can you post the
EXPLAIN
> > >ANALYZE output so we can see what is actually going on.
> > Thx, ANALYZE was good idea. Here it comes - right now, there is index on
> > 'cluster' (BTREE) @ dtditems. But it was not used - I guess because
reading
> > & seraching will cost more than pure seq scan on 'few' items...
>
> Hmm... have you tried running VACUUM periodically?
Sure.... But I will try 'full'....

Joy ! You hit the right problem... Thank you !

Seq Scan on dtditems (cost=0.00..16.40 rows=113 width=82) (actual
time=0.78..3.30 rows=113 loops=1) Filter: ("cluster" = 42) Total
runtime: 3.84 msec

It required 'full' vacuum.. My bad I guess.... Now is the execution time
'constant' :)

ps: my MAJOR problem was: WHY are execution time soo different ?

4 sequential execs:

Seq Scan on dtditems (cost=0.00..253.40 rows=150 width=84) (actual
time=1534.52..1566.37 rows=113 loops=1) Filter: ("cluster" = 42) Total
runtime: 1566.95 msec

Seq Scan on dtditems (cost=0.00..253.40 rows=150 width=84) (actual
time=29.27..32.29 rows=113 loops=1) Filter: ("cluster" = 42) Total
runtime: 32.81 msec

Seq Scan on dtditems (cost=0.00..253.40 rows=150 width=84) (actual
time=1695.69..1735.83 rows=113 loops=1) Filter: ("cluster" = 42) Total
runtime: 1736.36 msec

Seq Scan on dtditems (cost=0.00..253.40 rows=150 width=84) (actual
time=29.27..32.29 rows=113 loops=1) Filter: ("cluster" = 42) Total
runtime: 53.12 msec

Any hint why there was this difference ?

R.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rick Seeger 2003-10-29 19:14:14 Re: dump schema schema only?
Previous Message Jean-Michel POURE 2003-10-29 18:31:51 Re: [GENERAL] pgAdmin vs SQL Server Enterprise Manager