Hello Hackers,
To improve selectivities of queries I suggest to add support of
multidimensional histograms as described in paper [1].
To query multidimensional histograms efficiently we can use H-trees as
described in paper [2].
Postgres has limited support of multivariate statistics:
* MCV only useful for columns with small number of distinct values;
* functional dependencies only reflect dependencies among columns
(not column values).
[1] http://www.cs.cmu.edu/~rcarlson/docs/RyanCarlson_databases.pdf
[2] https://dl.acm.org/doi/pdf/10.1145/50202.50205
--
Regards,
Alexander Cheshev