Re: Why is that index not used?
| От | Tom Lane |
|---|---|
| Тема | Re: Why is that index not used? |
| Дата | |
| Msg-id | 2612.1232553100@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Why is that index not used? (Michael Monnerie <michael.monnerie@is.it-management.at>) |
| Ответы |
Re: Why is that index not used?
|
| Список | pgsql-admin |
Michael Monnerie <michael.monnerie@is.it-management.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
В списке pgsql-admin по дате отправления: