From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Monnerie <michael(dot)monnerie(at)is(dot)it-management(dot)at> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Why is that index not used? |
Date: | 2009-01-21 15:51:40 |
Message-ID: | 2612.1232553100@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Michael Monnerie <michael(dot)monnerie(at)is(dot)it-management(dot)at> writes:
> Can somebody explain me why on the last line, "dbmail_physmessage",
> there is a seq. scan going on and no index used?
Because it chose to use a hash instead. Given the rowcounts I don't
think that's wrong, but if you want to see the other plan you can try
setting enable_hashjoin = off (and maybe enable mergejoin = off if
it goes to a merge join next).
As for your other question, the reason it likes the dbmail_messages_1
index is probably that it's a lot smaller than dbmail_messages_7.
The only thing I'm seeing that seems curious is that when forced to
use dbmail_messages_7, it isn't using what seems to be an available
index condition.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Rusinov | 2009-01-21 16:51:10 | Re: PostgreSQL monitoring |
Previous Message | Alvaro Herrera | 2009-01-21 15:40:46 | Re: Why is that index not used? |