pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yeb Havinga <yebhavinga@gmail.com>
To: David Jarvis <thangalin@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thom Brown <thombrown@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimize date query for large child tables: GiST or GIN?
Date: Fri, 21 May 2010 10:45:36 +0200
Message-ID: <4BF64830.4080902@gmail.com> (raw)
In-Reply-To: <4BF64693.8050800@gmail.com>
References: <AANLkTimk7lRS8FHJOot3tF-c6Ds4jexCvWKEQNU1V0Xt@mail.gmail.com>
	<AANLkTim7O3Aalp31WKwBuTufYXeUMQWkwy51nvRcI0QY@mail.gmail.com>
	<AANLkTikl8wlHPJaArMWO9XWgG0vk9tununw3eUAYh1IC@mail.gmail.com>
	<7767.1274385170@sss.pgh.pa.us>
	<AANLkTikOEC-Gr3eqGlyGauRAZJknQEaS5DEWw-ZOcl6r@mail.gmail.com>
	<7917.1274385834@sss.pgh.pa.us>
	<AANLkTimLdBWaVpSF5Sc3ArT_9jcAjhNiB9WBBA4HIyXj@mail.gmail.com>
	<8132.1274386738@sss.pgh.pa.us>
	<AANLkTikK_xUrI7iOU9CzpYAKbtxZz-chc3SaHGhTEGXP@mail.gmail.com>
	<20100520210106.GO21875@tamriel.snowman.net>
	<AANLkTinAs8sWmMjEynf1K0DNsmaIiqRRNqVR5tNlkbuC@mail.gmail.com>
	<4BF64693.8050800@gmail.com>

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





view thread (44+ messages)  latest in thread

Message-ID: <4BF64830.4080902@gmail.com>
Permalink:  ../4BF64830.4080902@gmail.com/
Also on:    postgresql.org/message-id/4BF64830.4080902@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: yebhavinga@gmail.com, thangalin@gmail.com, sfrost@snowman.net, tgl@sss.pgh.pa.us, thombrown@gmail.com
  Subject: Re: Optimize date query for large child tables: GiST or GIN?
  In-Reply-To: <4BF64830.4080902@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox