New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce index:dcount() function #6080
Comments
I think that new index method - is wrong idea, because we have already had box.space.tester.index.primary:count('Alpha!', { iterator = 'LE', distinct = true })
box.space.tester.index.primary:count('Alpha!', { distinct = true }) -- iterator = 'ALL' |
You seem to misunderstand the ticket. It is not distinct count. It is approximate distinct count. Using a flag |
Ok, change My points:
Looks good to do if we have no other tasks. |
approximate, disticnt, doesn't matter... if this function has the same as Redis inplementation accurancy - seems that this will be enougth, but, why not to make this function a part of LUA API to make it possible to use it for tables as well as for indexes? |
Currently one of mainstream algorithms is HyperLogLog which makes it possible to approximately count the number of distinct elements using almost no memory overhead. I suggest to implement index method
:dcount()
(d stands for distinct) which would apply HyperLogLog and return cardinality of index keys (obviously it makes sense only for non-unique indexes). I suppose it might be useful for some customers.The text was updated successfully, but these errors were encountered: