Re: [GENERAL] Unnecessary scan on a partial index slows down query dramatically

2008-04-25 Thread Tom Lane
"Jimmy Choi" <[EMAIL PROTECTED]> writes: > Thanks. I'm not really in a position to upgrade at the moment. Why not? A minor version update doesn't take much more than stop the server, install new binaries, start the server. regards, tom lane -- Sent via pgsql-general mai

Re: [GENERAL] Unnecessary scan on a partial index slows down query dramatically

2008-04-25 Thread Andrew Sullivan
On Fri, Apr 25, 2008 at 12:29:48PM -0400, Jimmy Choi wrote: > Thanks. I'm not really in a position to upgrade at the moment. You know that an upgrade of 8.1 to the latest is not a dump and restore, and that running an older stability-and-security release of the software is probably more dangerous

Re: [GENERAL] Unnecessary scan on a partial index slows down query dramatically

2008-04-25 Thread Jimmy Choi
Thanks. I'm not really in a position to upgrade at the moment. I guess in the short-term I'll tweak the query to work around this (e.g. removing "status = 3" or adding more refining conditions both seem to work). Please let me know if there are configuration settings I should try. Thanks, Jimmy

Re: [GENERAL] Unnecessary scan on a partial index slows down query dramatically

2008-04-25 Thread Tom Lane
"Jimmy Choi" <[EMAIL PROTECTED]> writes: > A simple query is executing much slower than expected. When looking at > the query plan, I see a bitmap index scan on a partial index that does > not have any associated index condition. How could that happen? Easily --- it thinks that the partial index p

[GENERAL] Unnecessary scan on a partial index slows down query dramatically

2008-04-25 Thread Jimmy Choi
Hello, A simple query is executing much slower than expected. When looking at the query plan, I see a bitmap index scan on a partial index that does not have any associated index condition. How could that happen? The query is: select id from test_run_results where test_run_id = 12902 and status