> > >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.