James Cloos <cloos(at)jhcloos(dot)com> wrote:
> create index mb_name_own_idx on mb ( lower(name), ownerid );
> WHERE lower(name) = lower('foo(at)bar') AND ownerid=7;
If you expect to be using an equality test on ownerid, you should
put that first in the index.
BTW, this is starting to sound more like something for the
pgsql-performance list than the pgsql-hackers list.
-Kevin