Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXXxq-0006uB-JO for pgsql-bugs@arkaria.postgresql.org; Wed, 01 May 2013 14:24:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UXXxq-0005EW-0z for pgsql-bugs@arkaria.postgresql.org; Wed, 01 May 2013 14:24:58 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXWSG-0002Ko-PQ for pgsql-bugs@postgresql.org; Wed, 01 May 2013 12:48:16 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXWSE-0006VM-5N for pgsql-bugs@postgresql.org; Wed, 01 May 2013 12:48:16 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXWSD-0007wM-64 for pgsql-bugs@postgresql.org; Wed, 01 May 2013 12:48:13 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UXWS7-0007V8-N2 for pgsql-bugs@postgresql.org; Wed, 01 May 2013 12:48:07 +0000 Date: Wed, 01 May 2013 12:48:07 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8130: Hashjoin still gives issues To: pgsql-bugs@postgresql.org From: stefan@konink.de X-Pg-Spam-Score: -4.5 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8130 Logged by: Stefan de Konink Email address: stefan@konink.de PostgreSQL version: 9.2.4 Operating system: Linux Description:=20=20=20=20=20=20=20=20 We figured out that two very close query give a massive difference performance between using select * vs select id. SELECT * FROM ambit_privateevent_calendars AS a ,ambit_privateevent AS b ,ambit_calendarsubscription AS c ,ambit_calendar AS d WHERE c.calendar_id =3D d.id AND a.privateevent_id =3D b.id AND c.user_id =3D 1270 AND c.calendar_id =3D a.calendar_id AND c.STATUS IN ( 1 ,8 ,2 ,15 ,18 ,4 ,12 ,20 ) AND NOT b.main_recurrence =3D true; With some help on IRC we figured out that "there was a bugfix in hash estimation recently and I was hoping you were older than that", but since we are not: PostgreSQL 9.2.4 on x86_64-pc-linux-gnu, compiled by x86_64-pc-linux-gnu-gcc (Gentoo 4.7.2-r1 p1.6, pie-0.5.5) 4.7.2, 64-bit ...there might still be a bug around. We compare: http://explain.depesz.com/s/jRx http://explain.depesz.com/s/eKE By setting "set enable_hashjoin =3D off;" performance in our entire application increased 30 fold in throughput, which was a bit unexpected but highly appreciated. The result of the last query: http://explain.depesz.com/s/AWB What can we do to provide a bit more of information? --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs