Re: Simple Join

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Simple Join
Дата
Msg-id 7484.1134600423@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Simple Join  (Kevin Brown <blargity@gmail.com>)
Ответы Re: Simple Join  (Kevin Brown <blargity@gmail.com>)
Re: Simple Join  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Simple Join  (Mitchell Skinner <mitch@arctur.us>)
Список pgsql-performance
Kevin Brown <blargity@gmail.com> writes:
> I'm running 8.1 installed from source on a Debian Sarge server.  I have a
> simple query that I believe I've placed the indexes correctly for, and I
> still end up with a seq scan.  It makes sense, kinda, but it should be able
> to use the index to gather the right values.

I continue to marvel at how many people think that if it's not using an
index it must ipso facto be a bad plan ...

That plan looks perfectly fine to me.  You could try forcing some other
choices by fooling with the planner enable switches (eg set
enable_seqscan = off) but I doubt you'll find much improvement.  There
are too many rows being pulled from ordered_products to make an index
nestloop a good idea.

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: PFC
Дата:
Сообщение: Re: Auto-tuning a VIEW?
Следующее
От: Kevin Brown
Дата:
Сообщение: Re: Simple Join