Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B8F026326C6 for ; Fri, 21 May 2010 05:45:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 47767-05 for ; Fri, 21 May 2010 08:45:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mail.postgresql.org (Postfix) with ESMTP id 7765F632693 for ; Fri, 21 May 2010 05:45:30 -0300 (ADT) Received: by ey-out-2122.google.com with SMTP id d26so90283eyd.33 for ; Fri, 21 May 2010 01:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=TGogYPUGOlblwSZjs4Jhih1UHfrb/+qya+vpJA5Ck+Q=; b=vXxqqIDmQygz6sJD3LNjr+DQMyKkLnMadqGQRsE+RKjgeYW27AhcR8+JLGhRaZ7xe8 VsvagqiSLIzY6pnxnqZT5a535FPWRecsWhMDRcoajkK+4EGx2Xrpz9LHy8Q3We/XJqtL nSZugiyuGDae4Lu1P1YE/csXpeuOWrJJXLKFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=Y8SP4J5fJC0uHZXrWL66o7pVq7BYrfddrdK9vkv026iGjRrV3njD2bm2Khhx/jZLoy CaCqPu1zv0JoykMkmRNd9nUF6KSNa9x9wI5nVBAyeoE9EUupG7qRDX/URLUY5SDMDUzu IIQ9FTIJb3KZhEVl+xYsCTzZ6GLhlMbfR0LVo= Received: by 10.213.53.70 with SMTP id l6mr312952ebg.45.1274431528560; Fri, 21 May 2010 01:45:28 -0700 (PDT) Received: from [0.0.0.0] (5357DA75.cable.casema.nl [83.87.218.117]) by mx.google.com with ESMTPS id 15sm380852ewy.12.2010.05.21.01.45.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 May 2010 01:45:28 -0700 (PDT) Message-ID: <4BF64830.4080902@gmail.com> Date: Fri, 21 May 2010 10:45:36 +0200 From: Yeb Havinga User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: David Jarvis CC: Stephen Frost , Tom Lane , Thom Brown , pgsql-performance@postgresql.org Subject: Re: Optimize date query for large child tables: GiST or GIN? References: <7767.1274385170@sss.pgh.pa.us> <7917.1274385834@sss.pgh.pa.us> <8132.1274386738@sss.pgh.pa.us> <20100520210106.GO21875@tamriel.snowman.net> <4BF64693.8050800@gmail.com> In-Reply-To: <4BF64693.8050800@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/139 X-Sequence-Number: 38723 There is a thing that might lead to confusion in the previous post: > create or replace function yearmod(int) RETURNS int > as 'select (($1 >> 2) %32);' > language sql > immutable > strict; is equivalent with create or replace function yearmod(int) RETURNS int as 'select (($1 / 4) %32);' language sql immutable strict; and that is the function that was used with all the other output (it can be seen inlined in the explain output). I did not catch this until after the post. regards, Yeb Havinga