I have 2 environment say A & B. A is the testing phrase 1 environment and B is testing phrase 2 env.
In A env I have database which holds more data than env B. When I run a select query on Env A it get's executed fast(say 40 seconds.)Same query executing on env B takes 50 minutes.
Result of this query doesn't return any records.It will be 0.
The select query has 15 joins.No aggregation/calculation is performed in this query. It's just selecting a columns.
1.Below are my analysis details:
I saw the execution plan on both ENV.
In A estimated number & actual number of rows is 0
In B estimated number = ~76 millions & actual number of rows is 0
In env a= ~0.99 for all 15 tables
In env b = ~ 14 for all 15 tables
3.Same query executing without where clause in B is taking just 1 minute.
Should I update the statistics?