indices on tab1.a=tab2.a - Mailing list pgsql-general

From admin
Subject indices on tab1.a=tab2.a
Date
Msg-id Pine.BSF.4.10.10001121250410.68208-100000@server.b0x.com
Whole thread Raw
List pgsql-general
I have unfortunately deleted a message to pgsql-general today which
contained a query like:

SELECT tab1.b, tab2.c FROM tab1, tab2 WHERE tab1.a=tab2.a;

There was also a UNION following, but my memory fails me. My question is
though, can an index be used for the above query? When I try it with an
index on tab1.a and tab2.a, I get two hash joins and two seq scans.

If there's any way to optimise this query, please let me know,
Marc


pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: [GENERAL] Simulating an outer join
Next
From: The Hermit Hacker
Date:
Subject: Re: [GENERAL] identifying performance hits: how to ???