Received: from hermes.gatewaynet.com (hermes.gatewaynet.com [217.19.69.34]) by postgresql.org (Postfix) with ESMTP id 723BB475897 for ; Tue, 26 Mar 2002 03:11:27 -0500 (EST) Received: œby rnd@gatewaynet.com (8.12.1/8.12.1) with ESMTP id g2Q8BQO2024883 for ; Tue, 26 Mar 2002 10:11:26 +0200 (EET) Received: from pc216 ([10.9.200.216]) by hermes.internal.net (Lotus Domino Release 5.0.9a) with SMTP id 2002032610112594:11490 ; Tue, 26 Mar 2002 10:11:25 +0200 From: Achilleus Mantzios To: pgsql-sql@postgresql.org Subject: Arrays Design Question Date: Tue, 26 Mar 2002 10:12:12 +0200 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <02032610121202.09965@pc216> X-MIMETrack: Itemize by SMTP Server on hermes/hermes(Release 5.0.9a |January 7, 2002) at 03/26/2002 10:11:26 AM, Serialize by Router on hermes/hermes(Release 5.0.9a |January 7, 2002) at 03/26/2002 10:11:26 AM, Serialize complete at 03/26/2002 10:11:26 AM Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="iso-8859-7" X-Archive-Number: 200203/338 X-Sequence-Number: 7213 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