2 Comments
Aug 12Liked by Andrei Lepikhov

Yes, I have always been worried that common values that are not in the MCV set could produce inefficient optimizer results. Good idea on checking the histogram or index. As you said, the big challenge is knowing when to check them. We might have the executor somehow detect this for later queries.

Expand full comment
author

Selectivity hook might open room for experiments in extensions with different approaches. Also, slight tuning of the AM interface, providing the physical position of the tuple in the index, could ease some limitations.

Expand full comment