On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote:
> On Tue, Feb 07, 2006 at 07:06:26AM +0100, Nemanja Corlija wrote:
> > On 2/7/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote:
> > > For test 8 on PostgreSQL, what's EXPLAIN ANALYZE for one of those show?
> > test=# EXPLAIN ANALYZE SELECT count(*), avg(b) FROM t2 WHERE b>=0 AND b<100;
> >                                                   QUERY PLAN
> >
> > ---------------------------------------------------------------------------------------------------------
> > ------
> >  Aggregate  (cost=6.02..6.03 rows=1 width=4) (actual time=0.183..0.185
> > rows=1 loops=1)
> >    ->  Index Scan using i2b on t2  (cost=0.00..6.01 rows=1 width=4)
> > (actual time=0.030..0.108 rows=12 loo
> > ps=1)
> >          Index Cond: ((b >= 0) AND (b < 100))
> >  Total runtime: 0.510 ms
> > (4 rows)
>
> Well, it expected 1 row and got 12. In this example it probably doesn't
> matter, but for other parameters it probably will.
>
> Did you happen to do an analyze?
Nope. All databases are run as default as possible. And, they all get
same scripts to execute.

> > > What changes have you made to the default postgresql.conf?
> > None.
>
> Well, that certainly won't help things... at a minimum, on your machine,
> you should change the following:
> shared_buffers=10000
> effective_cache_size=100000
>
> The following should also help:
> work_mem=10000
> vacuum_cost_delay=50
> autovacuum=on
> autovacuum_vacuum_scale_factor=0.2
Sure, I could do that. But then I'd also need to tune all other
databases to make things fair and that's not really what I intended to
do here. I want to keep things as "out of the box" as possible.

--
Nemanja Corlija <[EMAIL PROTECTED]>

Reply via email to