On Mon, Sep 04, 2006 at 19:09:16 +0200,
  Hans-Juergen Schoenig <[EMAIL PROTECTED]> wrote:
> setting work_mem to 2gb does not help here ;)
> set it to the max value on 8.0.
> this was my first try too.
> the problem is - there is no magic switch to mislead the planner a  
> little without hacking the system stats (which is not what people  
> should do i would say ;) ).

Did you combine that with telling it not to use sorts? I am not sure that
will really work for GROUP BY, but it is probably an easy test. You can
do an explain to see what it will try without actually running the query
in case it picks the poor plan again.

> my question is: is adding hooks for selectivity a feasable way of  
> dealing with things like that?

I think the expectation is that you create a functional index and that's
how you would tell the system to keep stats for particular functions. I
don't think data on the most common values are kept now for functional
indexes, but the index itself will still have clues about the data.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to