X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 6E7FCD1B4B2 for ; Sun, 18 Apr 2004 12:46:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68606-01 for ; Sun, 18 Apr 2004 12:46:38 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1C2B3D1B482 for ; Sun, 18 Apr 2004 12:46:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3IFkZjr019740; Sun, 18 Apr 2004 11:46:36 -0400 (EDT) To: Greg Stark Cc: "Jim C. Nasby" , pgsql-performance@postgresql.org Subject: Re: Horribly slow hash join In-reply-to: <873c719476.fsf@stark.xeocode.com> References: <20040416154502.GF87362@nasby.net> <450.1082133251@sss.pgh.pa.us> <20040416164644.GH87362@nasby.net> <808.1082135098@sss.pgh.pa.us> <20040416172523.GJ87362@nasby.net> <1263.1082138383@sss.pgh.pa.us> <20040416184541.GK87362@nasby.net> <10603.1082218095@sss.pgh.pa.us> <878ygu8auw.fsf@stark.xeocode.com> <15053.1082259958@sss.pgh.pa.us> <873c719476.fsf@stark.xeocode.com> Comments: In-reply-to Greg Stark message dated "18 Apr 2004 02:43:09 -0400" Date: Sun, 18 Apr 2004 11:46:35 -0400 Message-ID: <19739.1082303195@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/244 X-Sequence-Number: 6544 Greg Stark writes: > Eh? Oh, negative numbers? So low^high^sign. [ thinks about it... ] Yeah, that would work. We can't backpatch it without breaking existing hash indexes on int8, but it'd be reasonable to change for 7.5 (since at the rate things are going, we won't have pg_upgrade for 7.5 anyway...) > I wonder if it makes sense to have check the hash distribution after > generating the table and if it's bad then throw it away and try again with a > different hash function. The "different hash function" would probably just be > a seed value changing. Probably way overkill though. Yeah, it'd be a pain trying to get all the type-specific hash functions doing that. I'm also unconvinced that a simple change of seed value would necessarily make the distribution better. In the worst case, if the real problem is that all the input values are identical, you can reseed all day long and it won't fix it. regards, tom lane