Re: Proposal: collect frequency statistics for arrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: collect frequency statistics for arrays
Date
Msg-id 12406.1298055475@sss.pgh.pa.us
Whole thread Raw
In response to Proposal: collect frequency statistics for arrays  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: Proposal: collect frequency statistics for arrays
List pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> I have following proposal. Currently the ts_typanalyze function accumulates
> frequency statistics for ts_vector using lossy counting technique. But no
> frequency statistics is collecting over arrays. I'm going to generalize
> ts_typanalyze to make it collecting statistics for arrays too. ts_typanalyze
> internally uses lexeme comparison and hashing. I'm going to use functions
> from default btree and hash opclasses of array element type in this
> capacity. Collected frequency statistics for arrays can be used for && and
> @> operators selectivity estimation.

It'd be better to just make a separate function for arrays, instead of
trying to kluge ts_typanalyze to the point where it'd cover both cases.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Proposal: collect frequency statistics for arrays
Next
From: Robert Haas
Date:
Subject: Re: Assertion failure on UNLOGGED VIEW and SEQUENCE