On Wednesday 27 March 2002 09:09, you wrote:
> Achilleus ,
> > performance for the following problem:
> > I want to store the factors of a linear formula of unknown degree
> > (but less
> > than 10) in a table for online stats/graphs on historical data (about
> > 200 Mb).
Dear josh "for" does not mean "in".
> > I am thinking of
> > a) Store each formula as a float8 array and then write a pgsql
> > function in C
> > to compute the result given the value of variable x.
> > b) Add 10 columns of type float8 and store 0 values where the
> > position of the
> > column exceeds the degree of the formula.
The best performer is do the calculations in java using the "arrays" way.
(BTW pgsql Arrays are hated and used by everone it seems)
> BOTH of the above are poor approaches that will lead to headaches for
> you later on. Instead:
> c. Store each formula in a column in another table with a parent-child
^^^^ ^^^^^^^ ^ ^^^^^^
That was the question actually.
> relationship to your main table, i.e.
> online_stats stat_formulas
> --------------- ------------------
> online_stat_id -------------> online_stat_id
> This is basic relational database design. You should probably pick up
> a copy of "Relational Database Design for Mere Mortals" before you
> get yourself into a real mess ...
> -Josh Berkus
How did you conclude i was about to store the formulae in the stats table?
Is my English that bad?
Dynacom Tankers Mngmt
pgsql-sql by date
|Next:||From: Peter Galbavy||Date: 2002-03-27 11:32:02|
|Subject: Non-use of index ?|
|Previous:||From: David Stanaway||Date: 2002-03-27 07:06:37|
|Subject: Re: [SQL] resetting sequence|