stange optimizer results
Peter T. Brown <peter@memeticsystems.com>
From: "Peter T. Brown" <peter@memeticsystems.com>
To: pgsql-performance@postgresql.org
Date: 2002-11-21T18:18:53Z
Lists: pgsql-performance
Attachments
- sqlquestion.sql (text/x-sql)
Hello-- Attached is a file containing two SQL queries. The first take prohibitively long to complete because, according to EXPLAIN, it ignore two very important indexes. The second SQL query seems almost identical to the first but runs very fast because, according to EXPLAIN, it does uses all the indexes appropriately. Can someone please explain to me what the difference is here? Or if there is something I can do with my indexes to make the first query run like the second? Thanks Much Peter