Re: two dimensional statistics in Postgres

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: Katharina Büchse <katharina(dot)buechse(at)uni-jena(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: two dimensional statistics in Postgres
Date: 2014-11-06 11:05:35
Message-ID: 545B55FF.5080806@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/11/14 23:57, Tomas Vondra wrote:
> Dne 6 Listopad 2014, 11:50, Gavin Flower napsal(a):
>> Could you store a 2 dimensional histogram in a one dimensional array:
>> A[z] = value, where z = col * rowSize + row (zero starting index)?
> How would that work for columns with different data types?
>
> Tomas
>
I implicitly assumed that all cells were the same size & type. However,
I could devise a scheme to cope with columns of different types, given
the relevant definitions - but this would obviously be more complicated.

Also this method can be extended into higher dimensions.

Cheers,
Gavin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2014-11-06 11:16:44 Re: Order of views in stats docs
Previous Message Fujii Masao 2014-11-06 11:04:57 Re: Typo in comment