Re: BUG #4462: Adding COUNT to query causes massive slowdown - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: BUG #4462: Adding COUNT to query causes massive slowdown
Date
Msg-id 48EDF376.80801@gmx.net
Whole thread Raw
In response to BUG #4462: Adding COUNT to query causes massive slowdown  ("Jussi Pakkanen" <jpakkane@gmail.com>)
Responses Re: BUG #4462: Adding COUNT to query causes massive slowdown  ("Jussi Pakkanen" <jpakkane@gmail.com>)
List pgsql-bugs
Jussi Pakkanen wrote:
> However when I try to count the amount of distinct codes, I get this:
>
>
> EXPLAIN SELECT COUNT(DISTINCT code) FROM log;
>                                    QUERY PLAN
> ----------------------------------------------------------------------------
> -----
>  Aggregate  (cost=100801488.30..100801488.31 rows=1 width=10)
>    ->  Seq Scan on log  (cost=100000000.00..100721245.24 rows=32097224
> width=10)
> (2 rows)

This looks like you have one of the enable_${plantype} parameters turned
off.  100000000 is the penalty that is added when a plantype if turned off.

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Locale (unsupported) bug. uk_UA.KOI8-U
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #4461: Should avoid create tblspcs in system location