{"action":"created","issue":{"url":"https://api.github.com/repos/prestodb/presto/issues/10700","repository_url":"https://api.github.com/repos/prestodb/presto","labels_url":"https://api.github.com/repos/prestodb/presto/issues/10700/labels{/name}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/10700/comments","events_url":"https://api.github.com/repos/prestodb/presto/issues/10700/events","html_url":"https://github.com/prestodb/presto/issues/10700","id":326198223,"number":10700,"title":"Cassandra connector IN query very slow planning on large list","user":{"login":"aandis","id":4983347,"avatar_url":"https://avatars3.githubusercontent.com/u/4983347?v=4","gravatar_id":"","url":"https://api.github.com/users/aandis","html_url":"https://github.com/aandis","followers_url":"https://api.github.com/users/aandis/followers","following_url":"https://api.github.com/users/aandis/following{/other_user}","gists_url":"https://api.github.com/users/aandis/gists{/gist_id}","starred_url":"https://api.github.com/users/aandis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aandis/subscriptions","organizations_url":"https://api.github.com/users/aandis/orgs","repos_url":"https://api.github.com/users/aandis/repos","events_url":"https://api.github.com/users/aandis/events{/privacy}","received_events_url":"https://api.github.com/users/aandis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2018-05-24T16:26:59Z","updated_at":"2018-05-28T19:34:07Z","closed_at":null,"author_association":"NONE","body":"A query like -\r\n```sql\r\nselect col1\r\nfrom table\r\nwhere col2 in (<long list of integers>)\r\nand col3 in (<long list of string>)\r\nand col4 in (<another long list of integers>)\r\nand col1 is not null\r\ngroup by col1;\r\n```\r\n\r\ntakes more than 5 minutes just planning. My cassandra table being queried has a lot of partitions and list length for `IN` query I was experimenting with was anywhere between 50 to 200.\r\n`<col2, col3, col4>` together form the partition keys so I don't imagine a full table scan to take place during planning or execution. \r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/prestodb/presto/issues/comments/392591754","html_url":"https://github.com/prestodb/presto/issues/10700#issuecomment-392591754","issue_url":"https://api.github.com/repos/prestodb/presto/issues/10700","id":392591754,"user":{"login":"kokosing","id":7569403,"avatar_url":"https://avatars2.githubusercontent.com/u/7569403?v=4","gravatar_id":"","url":"https://api.github.com/users/kokosing","html_url":"https://github.com/kokosing","followers_url":"https://api.github.com/users/kokosing/followers","following_url":"https://api.github.com/users/kokosing/following{/other_user}","gists_url":"https://api.github.com/users/kokosing/gists{/gist_id}","starred_url":"https://api.github.com/users/kokosing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokosing/subscriptions","organizations_url":"https://api.github.com/users/kokosing/orgs","repos_url":"https://api.github.com/users/kokosing/repos","events_url":"https://api.github.com/users/kokosing/events{/privacy}","received_events_url":"https://api.github.com/users/kokosing/received_events","type":"User","site_admin":false},"created_at":"2018-05-28T19:34:07Z","updated_at":"2018-05-28T19:34:07Z","author_association":"MEMBER","body":"> Let me know if concurrent queries sound like a good idea and I'll start working on it.\r\n\r\nI am do not think running concurrent queries is a good idea, let's keep this option as a last resort.\r\n\r\nIf you have a tuple domain with multiple columns with values set, then the query which is send to Cassandra should use `IN` predicate as your original Presto query.\r\n```\r\nSELECT DISTINCT col2,col3,col4 FROM keyspace.table WHERE col2 IN (17491) AND col3 IN (12, 13, 14) AND col4 IN ('val1', 'val2');\r\n```"}}
{"actor":{"display_login":"kokosing"}}