Re: Forcing HashAggregation prior to index scan?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eugene <emelamud(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Forcing HashAggregation prior to index scan?
Date: 2004-07-10 03:10:04
Message-ID: 2132.1089429004@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Eugene <emelamud(at)yahoo(dot)com> writes:
> Can I force HashAggregation before index scan?

No. But look into why the planner's rows estimate is so bad here:

> -> Index Scan using refseq_sequence_key2 on refseq_sequence s (cost=0.00..1516.06 rows=389
> width=24) (actual time=0.352..491.107 rows=27391 loops=1)
> Index Cond: ((species)::text = 'Homo sapiens'::text)

Have you ANALYZEd this table recently? If so, maybe you need a larger
statistics target for the species column. The estimated row count
shouldn't be off by a factor of seventy...

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Laurent Martelli 2004-07-10 10:00:09 Re: achat borne wifi
Previous Message Mark Kirkwood 2004-07-10 03:06:20 Re: Cursors performance