indices on tab1.a=tab2.a

From: admin <admin(at)wtbwts(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: indices on tab1.a=tab2.a
Date: 2000-01-12 12:55:40
Message-ID: Pine.BSF.4.10.10001121250410.68208-100000@server.b0x.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Nina Kuznetsova 2000-01-12 13:20:08 query with LIKE
Previous Message yura 2000-01-12 12:34:34 Re[2]: [GENERAL] case-insensitive like operator