I am having an SQL query (mentioned below). When I am running this query it is taking 90 min to retrieve all records (approx 1 million records).
Fetching data from 5 tables using inner join in cache. Relative cost displaying 10 million
I wan to confirm How this query can be optimized