Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 32E10B5DBCB for ; Tue, 2 Aug 2011 03:52:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 11800-05 for ; Tue, 2 Aug 2011 06:52:28 +0000 (UTC) X-Greylist: delayed 00:05:18.011754 by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id CDB94B5DBC8 for ; Tue, 2 Aug 2011 03:52:27 -0300 (ADT) Received: by wyg8 with SMTP id 8so2099521wyg.19 for ; Mon, 01 Aug 2011 23:52:27 -0700 (PDT) Received: by 10.227.207.15 with SMTP id fw15mr7259601wbb.66.1312267628667; Mon, 01 Aug 2011 23:47:08 -0700 (PDT) Received: from ws-marias.localnet ([83.175.203.146]) by mx.google.com with ESMTPS id ff6sm4747234wbb.66.2011.08.01.23.47.06 (version=SSLv3 cipher=OTHER); Mon, 01 Aug 2011 23:47:07 -0700 (PDT) From: Maria Arias de Reyna Organization: Emergya To: pgsql-performance@postgresql.org Subject: Re: Which Join is better Date: Tue, 2 Aug 2011 08:47:02 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32-5-amd64; KDE/4.4.5; x86_64; ; ) References: <4E379C43.7020805@orkash.com> In-Reply-To: <4E379C43.7020805@orkash.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201108020847.03199.marias@emergya.es> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/17 X-Sequence-Number: 44464 El Martes 02 Agosto 2011, Adarsh Sharma escribi=F3: > Dear all, >=20 > Just want to know which join is better for querying data faster. >=20 > I have 2 tables A ( 70 GB ) & B ( 7 MB ) >=20 > A has 10 columns & B has 3 columns.Indexes exist on both tables's ids. >=20 > select p.* from table A p, B q where p.id=3Dq.id >=20 > or >=20 > select p.* from table B q , A p where q.id=3Dp.id >=20 >=20 > Thanks Hi Adarsh, What does a "EXPLAIN ANALYZE" say after a VACCUM? =2D-=20 Mar=EDa Arias de Reyna Dom=EDnguez =C1rea de Operaciones Emergya Consultor=EDa=20 Tfno: +34 954 51 75 77 / +34 607 43 74 27 =46ax: +34 954 51 64 73=20 www.emergya.es=20