I have more than 10lakh data in one table (example table name is :test1) and running below query and its taking more than 10 seconds to load the data so can you any one plz guide us to improve the load speed or any temp table can create and use it?
My Query
select distinct(email),'Prev Year Exist' as status
from test1
where created_date>='2024-04-01' and created_date<='2025-03-31'
AND ((pan in (select pan from test1 where created_date>='2023-04-01' and created_date<='2024-03-31'))
OR (mobileno in (select mobileno from test1 where created_date>='2023-04-01' and created_date<='2024-03-31'))
OR (email in (select email from test1 where created_date>='2023-04-01' and created_date<='2024-03-31')));
===============================================
its very slow to load the data so it should load faster using my query