Re: Performance Optimization for Dummies 2 - the SQL

From: "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance Optimization for Dummies 2 - the SQL
Date: 2006-10-05 16:29:42
Message-ID: eg3bqm$2dq$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Just to clarify: if I expect to join two tables that I expect to benfit from
indexed scans, I should create indexes on the joined columns on BOTH sides?

Carlo

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in message
news:12239(dot)1160054675(at)sss(dot)pgh(dot)pa(dot)us(dot)(dot)(dot)
> "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca> writes:
>> I didn't create an index on facility_address.address_id because I
>> expected
>> joins to go in the other direction (from facility_address to address).
>
> Well, that's your problem right there ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-10-05 16:35:33 Re: Performance Optimization for Dummies 2 - the SQL
Previous Message Merlin Moncure 2006-10-05 13:30:45 Re: Performance Optimization for Dummies 2 - the SQL