index usage in joins q'n

From: rihad <rihad(at)mail(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: index usage in joins q'n
Date: 2007-11-03 07:42:39
Message-ID: 472C266F.1060304@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

http://www.postgresql.org/docs/8.2/interactive/indexes-intro.html
states that "Indexes can moreover be used in join searches. Thus, an
index defined on a column that is part of a join condition can
significantly speed up queries with joins."

Does this mean that a condition like "WHERE ... [AND] lhs.a=rhs.b [AND]
..." where rhs.b is already unique-indexed, also requires (non-unique)
index on lhs.a for maximal join speed? Otherwise why would they want to
say that?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-11-03 08:49:19 Re: index usage in joins q'n
Previous Message A. Kretschmer 2007-11-03 07:33:44 Re: Would an index benefit select ... order by?