Re: Shards + hash = forever running queries

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Shards + hash = forever running queries
Date: 2012-07-23 11:43:38
Message-ID: CA+mi_8b5mePCyMAskNG4i=5eB6ZK3ByDkG=7e-YzEkqs3sJB3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Jul 23, 2012 at 11:03 AM, Daniele Varrazzo
<daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> 1. Can we fix the queries to work around this problem?

As a stop-gap measure I've defined a get_big(id) function and using it
to pull in the details we're interested into from the "big" table:

create function get_big (id int) returns big as $$
select * from big where id = $1;
$$ language sql stable strict;

I'm not completely satisfied by it though: if there's any better
solution I'd be happy to know.

Thank you,

-- Daniele

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Dunstan 2012-07-23 12:29:16 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)
Previous Message Daniele Varrazzo 2012-07-23 10:03:11 Shards + hash = forever running queries