Please help me to improve this query performance
This particular query takes more than 5 mins to execute, can you please help me to improve its performance.
Select a.CustomerCode , A.CustomerNAme , CASE When B.PackageCode IS NULL Then 0 Else B.PackageCode End PackageCode,….
In that sql there is big data flow from NetworkVisitDetail table. Over 33 million rows.
Are you statistics up to date? Plan is showing estimated rows 1348375 but actual rows are 33090931.