Search Postgresql Archives

Normalized storage to denormalized report

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

 



I have a table that stores data like so:

Create table raw_vals (
    expt_id int,
    clone_idx int,
    val numeric,
    primary key (expt_id,clone_idx)
);

And I would like to design a query that gives:

Clone_idx   expt_id_1  expt_id_2 ....
1           0.7834     0.8231    ....
2           0.2832     1.2783    ....

There are several tens-of-thousands of clone_idx entries, so doing this
quickly may not even be possible.  Any suggestions on how to go from this
normalized structure to the denormalized form easily.   Note that this isn't
exactly a crosstab, since there is no counting data, just reshaping.

Thanks,
Sean




[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