Re: Performance Optimization for Dummies 2 - the SQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> wrote in message 
news:12239.1160054675@xxxxxxxxxxxxxxxx
> "Carlo Stonebanks" <stonec.register@xxxxxxxxxxxx> 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
> 




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux