Q1
Select * from product p where EXISTS (select * from order_items o where o.product_id = p.product_id)
Q2
Select * from product p where product_id IN (select product_id from order_items ....);
Which of these inferences are valid with respect to the queries given above?
Options
- Q1 is more optimized than Q2
- Q2 is more optimized than Q1
- Q1 performs slowly but is efficient
- Q2 performs slowly but is efficient