Tomasz Myrta <jasiek(at)klaster(dot)net> writes:> Postgres doesn't use join on these both fields and doesn't use index > scan properly.
Hard to say much when you didn't actually show us the output of EXPLAINANALYZE.
regards, tom lane