Re: Performace question - Mailing list pgsql-general

From Lada 'Ray' Lostak
Subject Re: Performace question
Date
Msg-id 016c01c39e50$9e6b24a0$0d01a8c0@utopia
Whole thread Raw
In response to Performace question  ("Lada 'Ray' Lostak" <ray@unreal64.net>)
List 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.


pgsql-general by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: pgAdmin vs SQL Server Enterprise Manager
Next
From: "Rick Seeger"
Date:
Subject: Re: dump schema schema only?