Thank you so much!
So to recap the general way to reproduce this issue is:
create table products(id int primary key, type varchar);
insert into products select generate_series(1,1), 'aaa';
insert into products select generate_series(10001,2), 'bbb';
create index idx on products(type);
pre
David Johnston writes:
> âWhile "planner hints" comes to mind...on the SQL side can we extend the
> "PREPARE" command with two additional keywords?â
> âPREPARE
> name [ ( data_type [, ...] ) ] [
> [NO] GENERIC
> â] â
> âAS statement
Don't really see the point. The OP's problem is t
On Thu, Nov 13, 2014 at 5:47 PM, Tom Lane wrote:
> David G Johnston writes:
> > Tom Lane-2 wrote
> >> In the meantime, I assume that your real data contains a small
> percentage
> >> of values other than these two? If so, maybe cranking up the statistics
> >> target would help. If the planner
David G Johnston writes:
> Tom Lane-2 wrote
>> In the meantime, I assume that your real data contains a small percentage
>> of values other than these two? If so, maybe cranking up the statistics
>> target would help. If the planner knows that there are more than two
>> values in the column, I t
Tom Lane-2 wrote
> In the meantime, I assume that your real data contains a small percentage
> of values other than these two? If so, maybe cranking up the statistics
> target would help. If the planner knows that there are more than two
> values in the column, I think it would be less optimistic