Re: 8.3.1 query plan

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: 8.3.1 query plan
Дата
Msg-id 20080827163202.GB2514@svana.org
обсуждение исходный текст
Ответ на 8.3.1 query plan  (Steve Clark <sclark@netwolves.com>)
Ответы Re: 8.3.1 query plan  (Steve Clark <sclark@netwolves.com>)
Список pgsql-general
On Wed, Aug 27, 2008 at 11:00:54AM -0400, Steve Clark wrote:
> So I did an explain and I see it is doing a seq scan in the last sub plan -
> there are about 375,000 rows
> in myevent - why isn't it using the index instead of doing a seq scan?
>
> create unique index indx1myevents on myevents (event_log_no)
> CREATE INDEX

Are there NULLs in this subtable? NOT IN must check the entire table
for NULLs. Try changing the query to use NOT EXISTS.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: "Phoenix Kiula"
Дата:
Сообщение: Re: Dumping/Restoring with constraints?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Dumping/Restoring with constraints?