index not used in joins

From: Sebastian Böck <sebastianboeck(at)freenet(dot)de>
To: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: index not used in joins
Date: 2004-12-13 08:41:43
Message-ID: 41BD55C7.1090502@freenet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

i have a problem with index usage and joins.
Attached is some SQL demonstrating my problem;

Why is the index only used in the 2nd query?

Can anybody explain me how to avoid/fix this.

Thanks in advance

Sebastian

Attachment Content-Type Size
test.sql text/plain 1.5 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-12-13 09:41:45 Re: High volume inserts - more disks or more CPUs?
Previous Message Shridhar Daithankar 2004-12-13 06:52:07 Re: Spanning tables