Skip to content
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

Query not working with multiple in clause #212

Open
bigdatasourav opened this issue Jul 4, 2022 · 0 comments
Open

Query not working with multiple in clause #212

bigdatasourav opened this issue Jul 4, 2022 · 0 comments
Assignees

Comments

@bigdatasourav
Copy link

Query tested in turbot/steampipe-plugin-aws#1134

Case 1 : with Single in clause (query is working)

> explain select service_code, version from aws_pricing_product where service_code = 'AmazonEC2' and field = 'instanceType' and value in ('r5d.16xlarge','t3.micro') limit 1
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY PLAN                                                                                                                                    |
+-----------------------------------------------------------------------------------------------------------------------------------------------+
| Limit  (cost=0.00..40000000.00 rows=1 width=400)                                                                                              |
|   ->  Foreign Scan on aws_pricing_product  (cost=0.00..40000000000000.00 rows=1000000 width=400)                                              |
|         Filter: ((value = ANY ('{r5d.16xlarge,t3.micro}'::text[])) AND (service_code = 'AmazonEC2'::text) AND (field = 'instanceType'::text)) |
+-----------------------------------------------------------------------------------------------------------------------------------------------+

Case 2 : with multiple in clause (query is not working)

> explain select * from aws_pricing_product where service_code in ('AmazonEC2','test') and field = 'instanceType' and value in ('r5d.16xlarge','t3.micro') limit 1
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| QUERY PLAN                                                                                                                                                   |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Limit  (cost=0.00..100000000.00 rows=1 width=1000)                                                                                                           |
|   ->  Foreign Scan on aws_pricing_product  (cost=0.00..100000000000000.00 rows=1000000 width=1000)                                                           |
|         Filter: ((service_code = ANY ('{AmazonEC2,test}'::text[])) AND (value = ANY ('{r5d.16xlarge,t3.micro}'::text[])) AND (field = 'instanceType'::text)) |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants