Every table/column/index starts with no stats, we can't just assume it's ok to use an index based on that (which one, if there are many?). You can propose and explore the idea of course, but I don't think it's very promising. I may be wrong, though ...
-
-
Replying to @fuzzycz @AndresFreundTec
It worked this way in 9.6 when brin was advertized. The problem is that all other useful stats already got you an answer in selectivity estimate, but then brin makes bold assumption that there's btree-like correlation stats for datatype and tests it out of selectivity framework.
1 reply 0 retweets 0 likes -
Replying to @komzpa @AndresFreundTec
Hmm, ok. I'm not aware of that, but presumably that was removed/changed for a reason. I.e. it was an issue in some other cases. Unfortunate
I still think the right solution is to collect some new statistics type for these data types. We have similar issues for JSONB too
1 reply 0 retweets 0 likes -
Replying to @fuzzycz @AndresFreundTec
Reason looks to be usual: someone indexed only something like text/int and checked only text/int btree-replacement to be improved, ignoring that brin also is a subsitiute to unsortable gist-replacement.
2 replies 0 retweets 0 likes -
what needs to be measured there is not "correlation" but "overlap" and there is no framework in postgres to do that.
1 reply 0 retweets 0 likes -
Replying to @komzpa @AndresFreundTec
Yes, there is not. So maybe this is the missing bit we need to collect during ANALYZE
1 reply 0 retweets 0 likes -
Replying to @fuzzycz @AndresFreundTec
yeah, so bad. want to get a plain bug fixed, proposed to write a new subsystem instead.
2 replies 0 retweets 0 likes -
Replying to @komzpa @AndresFreundTec
Well, I don't want to be rude, but this is open source - if it matters to you, you have the option to invest your time and write a patch. I've already offered to help with that, but I'm not going to commit to writing anything on my own.
1 reply 0 retweets 0 likes -
FWIW the patch might actually be fairly simple/small, the main question is what stats to collect. It's just a guess, of course.
1 reply 0 retweets 0 likes -
Shrug. I don't quite get what you're trying to do by posting patches to place you know they're not accepted.
-
-
Replying to @AndresFreundTec @fuzzycz
I did not have to set up anything, I pushed edit button, changed the thing and pushed "save" - "send pull request" to get a link, at my sleepless 3am, to share the idea. If you guys choose to specifically ignore this piece problem is not in me. I'll jump across the walls later.
0 replies 0 retweets 3 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.