Search Postgresql Archives

Re: 8.3.1 query plan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux