Jeremy Drake <pgsql(at)jdrake(dot)com> writes:
> CREATE TABLE test_domain (
> fkey integer not null,
> k integer not null,
> x1 integer not null,
> x2 integer,
> mp m_or_p not null
> );
> CREATE INDEX test_domain_k_x1_x2_m ON test_domain (k, x1, x2) WHERE mp = 'm';
> CREATE INDEX test_domain_k_x1_x2_p ON test_domain (k, x1, x2) WHERE mp = 'p';
Perhaps you need a non-partial index.
regards, tom lane