{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/7634","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/7634/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/7634/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/7634/events","html_url":"https://github.com/pingcap/tidb/issues/7634","id":357585894,"node_id":"MDU6SXNzdWUzNTc1ODU4OTQ=","number":7634,"title":"Enhance the method `Selectivity`","user":{"login":"winoros","id":7846227,"node_id":"MDQ6VXNlcjc4NDYyMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/7846227?v=4","gravatar_id":"","url":"https://api.github.com/users/winoros","html_url":"https://github.com/winoros","followers_url":"https://api.github.com/users/winoros/followers","following_url":"https://api.github.com/users/winoros/following{/other_user}","gists_url":"https://api.github.com/users/winoros/gists{/gist_id}","starred_url":"https://api.github.com/users/winoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winoros/subscriptions","organizations_url":"https://api.github.com/users/winoros/orgs","repos_url":"https://api.github.com/users/winoros/repos","events_url":"https://api.github.com/users/winoros/events{/privacy}","received_events_url":"https://api.github.com/users/winoros/received_events","type":"User","site_admin":false},"labels":[{"id":667671533,"node_id":"MDU6TGFiZWw2Njc2NzE1MzM=","url":"https://api.github.com/repos/pingcap/tidb/labels/component/planner","name":"component/planner","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"winoros","id":7846227,"node_id":"MDQ6VXNlcjc4NDYyMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/7846227?v=4","gravatar_id":"","url":"https://api.github.com/users/winoros","html_url":"https://github.com/winoros","followers_url":"https://api.github.com/users/winoros/followers","following_url":"https://api.github.com/users/winoros/following{/other_user}","gists_url":"https://api.github.com/users/winoros/gists{/gist_id}","starred_url":"https://api.github.com/users/winoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winoros/subscriptions","organizations_url":"https://api.github.com/users/winoros/orgs","repos_url":"https://api.github.com/users/winoros/repos","events_url":"https://api.github.com/users/winoros/events{/privacy}","received_events_url":"https://api.github.com/users/winoros/received_events","type":"User","site_admin":false},"assignees":[{"login":"winoros","id":7846227,"node_id":"MDQ6VXNlcjc4NDYyMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/7846227?v=4","gravatar_id":"","url":"https://api.github.com/users/winoros","html_url":"https://github.com/winoros","followers_url":"https://api.github.com/users/winoros/followers","following_url":"https://api.github.com/users/winoros/following{/other_user}","gists_url":"https://api.github.com/users/winoros/gists{/gist_id}","starred_url":"https://api.github.com/users/winoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winoros/subscriptions","organizations_url":"https://api.github.com/users/winoros/orgs","repos_url":"https://api.github.com/users/winoros/repos","events_url":"https://api.github.com/users/winoros/events{/privacy}","received_events_url":"https://api.github.com/users/winoros/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-09-06T10:08:13Z","updated_at":"2018-09-26T08:07:59Z","closed_at":null,"author_association":"MEMBER","body":"It only return a float number tell you the selectivity of the given filters.\r\nThe `NDV`(number of distinct value) of one column cannot be maintained easily if we don't know this column's distribution after the given filters though we have histogram information.\r\nReturn these information from `Selectivity` seems to be a good choice."},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/424624858","html_url":"https://github.com/pingcap/tidb/issues/7634#issuecomment-424624858","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/7634","id":424624858,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDYyNDg1OA==","user":{"login":"winoros","id":7846227,"node_id":"MDQ6VXNlcjc4NDYyMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/7846227?v=4","gravatar_id":"","url":"https://api.github.com/users/winoros","html_url":"https://github.com/winoros","followers_url":"https://api.github.com/users/winoros/followers","following_url":"https://api.github.com/users/winoros/following{/other_user}","gists_url":"https://api.github.com/users/winoros/gists{/gist_id}","starred_url":"https://api.github.com/users/winoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winoros/subscriptions","organizations_url":"https://api.github.com/users/winoros/orgs","repos_url":"https://api.github.com/users/winoros/repos","events_url":"https://api.github.com/users/winoros/events{/privacy}","received_events_url":"https://api.github.com/users/winoros/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T08:07:59Z","updated_at":"2018-09-26T08:07:59Z","author_association":"MEMBER","body":"@tianjiqx Em, there's problem that when the bucket is not fully in the ranges, we decide the selectivity of this bucket by the uniform distribution assumption.\r\nSo `$$NDV_i = NDV_i * (1 - (1-sel_i)^{freq_i}) * (1 - (1 - sel_{other})^{freq_i})$$` is not very usable."}}
{"actor":{"display_login":"winoros"}}