stange optimizer results

From: "Peter T(dot) Brown" <peter(at)memeticsystems(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: stange optimizer results
Date: 2002-11-21 18:18:53
Message-ID: 1037902735.1784.22.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

Attachment Content-Type Size
sqlquestion.sql text/x-sql 4.3 KB

In response to

  • vacuum full at 2002-11-21 16:52:05 from Henrik Steffen

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Henrik Steffen 2002-11-21 18:20:16 Re: vacuum full
Previous Message Henrik Steffen 2002-11-21 18:17:46 Re: vacuum full