Re: Trading off large objects (arrays, large strings,

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: Antonios Christofides <anthony(at)itia(dot)ntua(dot)gr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trading off large objects (arrays, large strings,
Date: 2005-02-15 15:42:08
Message-ID: Pine.LNX.4.44.0502151625470.3075-101000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I did package for packing and unpacking large time series (in text format)
into binary object. You can use it. Its very fast, storing 3 cols and
90000 rows ~ 10sec(P160).

testdb011=# select * FROM time_series_unpack(
testdb011(# time_series_pack(
testdb011(# '10.23, 10.21, 10.222'||chr(10)||
testdb011(# '1.1, 2.5,3.10 '||chr(10)||
testdb011(# '1.1, 1.2,1.5'),1);
row | f
-----+-------
1 | 10.23
2 | 1.1
3 | 1.1
(3 rows)

testdb011=# select * FROM time_series_unpack(
testdb011(# time_series_pack(
testdb011(# '10.23, 10.21, 10.222'||chr(10)||
testdb011(# '1.1, 2.5,3.10 '||chr(10)||
testdb011(# '1.1, 1.2,1.5'),3);
row | f
-----+--------
1 | 10.222
2 | 3.1
3 | 1.5
(3 rows)

testdb011=# select avg(f), min(f), max(f), count(f) from (
testdb011(# select * FROM time_series_unpack(
testdb011(# time_series_pack(
testdb011(# '10.23, 10.21, 10.222'||chr(10)||
testdb011(# '1.1,2.5,3.10 '||chr(10)||
testdb011(# '1.1, 1.2, 1.5'),3)) d;
avg | min | max | count
------------------+-----+--------+-------
4.94066667556763 | 1.5 | 10.222 | 3
(1 row)

Regards
Pavel Stehule

Attachment Content-Type Size
ts.tar.gz application/x-gzip 2.8 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2005-02-15 15:58:09 Re: Lost rows/data corruption?
Previous Message Scott Marlowe 2005-02-15 15:31:03 Re: Alternate db location