pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <rnd@gatewaynet.com>
To: pgsql-sql@postgresql.org
Subject: Arrays Design Question
Date: Tue, 26 Mar 2002 10:12:12 +0200
Message-ID: <02032610121202.09965@pc216> (raw)

Hi,
i am wondering about what could be the best design practice regarding 
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).
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 array implementation seems more simple and more neat since it has no 
assumptions about the maximal degree, but it is not standard SQL,
the JDBC might have problems with array types, and i dont know the performance
implications.

Could some one please give a point to read about arrays implementation in 
postgresql, their performance, accessing arrays from server pgsql C 
functions??

Thanx

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  it@dynacomtm.com
        rnd@gatewaynet.com




view thread (3+ messages)  latest in thread

Message-ID: <02032610121202.09965@pc216>
Permalink:  ../02032610121202.09965@pc216/
Also on:    postgresql.org/message-id/02032610121202.09965@pc216

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rnd@gatewaynet.com
  Subject: Re: Arrays Design Question
  In-Reply-To: <02032610121202.09965@pc216>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox