From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
Cc: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bad estimate on LIKE matching |
Date: | 2006-01-18 09:51:44 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE6C7EC8@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > I have tried upping the statistics target up to 1000, with
> no changes.
>
> > Any way to teach the planner about this?
>
> In a recent thread on -perform, I opined that this case could
> best be solved by using dynamic random block sampling at plan
> time followed by a direct evaluation of the LIKE against the
> sample. This would yield a more precise selectivity and lead
> to the better plan. So it can be improved for the next release.
I was kinda hoping for something I could use in 8.1 :-) Even if it's an
ugly solution for now. (My current workaround of writing it to a temp
table and the joining to the temp table causes a reasonable plan, but
I'd like something slightly less ugly than that if possible..)
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Leandro Guimarães Faria Corcete DUTRA | 2006-01-18 13:08:53 | Re: Surrogate keys (Was: enums) |
Previous Message | Simon Riggs | 2006-01-18 08:46:34 | Re: equivalence class not working? |