Search Postgresql Archives

Re: unnest-like pg_stats.most_common_values and pg_stats.most_common_freqs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 20, 2017 at 4:38 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:

> Those two aren't correlated ... but I think what you want is
>
> select ...,v,f
> from
>   pg_stats,
>   rows from (unnest(most_common_vals::text::text[]),
>              unnest(most_common_freqs)) r(v,f)
> where ...

Of course I was meaning MCVs and MCFs, it did not make sense to use
the histogram here!
Thanks for the query, it works (tested on 9.6.6).

Luca




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux