Re: Shards + hash = forever running queries - Mailing list pgsql-performance

From Daniele Varrazzo
Subject Re: Shards + hash = forever running queries
Date
Msg-id CA+mi_8b5mePCyMAskNG4i=5eB6ZK3ByDkG=7e-YzEkqs3sJB3A@mail.gmail.com
Whole thread Raw
In response to Shards + hash = forever running queries  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List pgsql-performance
On Mon, Jul 23, 2012 at 11:03 AM, Daniele Varrazzo
<daniele.varrazzo@gmail.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

pgsql-performance by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Shards + hash = forever running queries
Next
From: "Martin French"
Date:
Subject: Re: Odd blocking (or massively latent) issue - even with EXPLAIN