Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jul 4, 2011, at 19:48, Daniel Farina <daniel@xxxxxxxxxx> 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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux