Re: [GENERAL] Problem with index not always being used

2007-02-17 Thread Rob Tester
I am using pg 8.1.4, I have a table with 1.1 million rows of data (see below for table definition). One field state is numeric and has an index. The index is not always picked up when searching the table by state only and I can't figure out why. So: SELECT * FROM STUFF WHERE state=12; --causes

Re: [GENERAL] Help with an index and the optimizer

2007-02-17 Thread Rob Tester
I am using pg 8.1.4, I have a table with 1.1 million rows of data (see below for table definition). One field state is numeric and has an index. The index is not always picked up when searching the table by state only and I can't figure out why. So: SELECT * FROM STUFF WHERE state=12; --causes

Re: [GENERAL] Problem with index not always being used

2007-02-17 Thread Rob Tester
vestigating the statistics and the random_page_cost. Thank you for your insight. Rob. On 2/17/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Rob Tester" <[EMAIL PROTECTED]> writes: > SELECT * FROM STUFF WHERE state=12; --causes a seq scan of the table > where > SELECT