Well i am trying to create a query which uses a subquery in the from clause
I want as soon as the subquery fetches a row the , the subquery should stop executing , beacuse the table used by subquery has 40 million rows
THIS is so far i have been doing
Expand|Select|Wrap|Line Numbers
- SELECT column FROM some_table
- WHERE EXISTS (SELECT * FROM some_other_table WHERE date BETWEEN start_date AND end_date)
But the table in subquery has 40 million rows so i need to stop the whole table scan , and exit the subquery as soon as any row comes from the subquery
I have tried usin IN, SOME, And ANY also