Re: Finding latest record for a number of groups in an INSERT-only table - Mailing list pgsql-general

From David Johnston
Subject Re: Finding latest record for a number of groups in an INSERT-only table
Date
Msg-id AEE29137-7EF5-4365-ADB4-658D3904F4B5@yahoo.com
Whole thread Raw
In response to Finding latest record for a number of groups in an INSERT-only table  (Daniel Farina <daniel@heroku.com>)
Responses Re: Finding latest record for a number of groups in an INSERT-only table
List pgsql-general

On Jul 4, 2011, at 19:48, Daniel Farina <daniel@heroku.com> wrote:

> This is basically exactly the same as
> http://archives.postgresql.org/pgsql-sql/2008-10/msg00009.php; I'm
> just asking again, to see if thinking on the problem has changed:
>
> The basic problem, restated, is one has a relation with tuples like this:
>
> (key, recency_stamp, other_columns*)
>
> Some example data may be:
>
> 'ice cream', 0, 'vanilla'
> 'ice cream', 1, 'chocolate'
> 'beer', 0, 'ale'
> 'beer', 3, 'lager'
>
> The goal is to extract from this relation the following:
>
> 'ice cream', '1', 'chocolate'
> 'beer', 3, 'lager'
>
>
>
> I am using PostgreSQL 9.
>
> Does anyone have fresh thoughts or suggestions for dealing with
> INSERT-mostly tables conceived in this manner?
>
>

Setup a materialized view.

David J.


pgsql-general by date:

Previous
From: "Brent Wood"
Date:
Subject: Re: Read MS-SQL data into Postgres via ODBC link?
Next
From: Yan Cheng CHEOK
Date:
Subject: Difference between inet and cidr