Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id EAE459FB304 for ; Thu, 5 Oct 2006 13:28:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 01409-05 for ; Thu, 5 Oct 2006 16:28:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id CCBEC9FB2FD for ; Thu, 5 Oct 2006 13:28:09 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id C988A30E1F; Thu, 5 Oct 2006 18:28:08 +0200 (MET DST) From: "Carlo Stonebanks" X-Newsgroups: pgsql.performance Subject: Re: Performance Optimization for Dummies 2 - the SQL Date: Thu, 5 Oct 2006 12:29:42 -0400 Organization: Hub.Org Networking Services Lines: 24 Message-ID: References: <12239.1160054675@sss.pgh.pa.us> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/127 X-Sequence-Number: 21256 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" wrote in message news:12239.1160054675@sss.pgh.pa.us... > "Carlo Stonebanks" 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 >