Timeline for Statistics and Execution plan in SQL Server
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 19, 2015 at 12:07 | history | edited | marc_s | CC BY-SA 3.0 |
added 23 characters in body; edited title
|
Nov 19, 2015 at 12:06 | comment | added | marc_s | It's statistics - not statics ..... | |
Nov 19, 2015 at 7:33 | comment | added | Neminath | I have both problem. 1)execution plan not showing propely 2) Statics not updating | |
Nov 19, 2015 at 7:31 | comment | added | Mikael Eriksson | Yes, I understand that but that is not what your question is about. You asked why the execution plan was wrong. In comments you are asking when auto update statistics happens. A totally different question. | |
Nov 19, 2015 at 7:27 | comment | added | Neminath | 1) In case of execution plan -what i am trying to say is , as you said i have updated some rows then execution plan showing correctly but when i insert fresh record execution plan not showing properly. 2) in case of statics- it is not updating until i update manualy. | |
Nov 19, 2015 at 7:21 | comment | added | Mikael Eriksson | How and when autoupdate statistics kick in sounds like a different question than the one you have here is it not? The plan shows an estimate of one row from the scan operator where the manually updated statistics shows 1500 something rows. The plan is recompiled and correct when you modify the table (one row is enough) and then manually update statistics right?. | |
Nov 19, 2015 at 7:11 | comment | added | Neminath | @MIkael Eriksson I have taken execution plan after updating the statics. if i update the inserted rows then execution plan showing correctly but if i inserted new rows execution plan not showing properly and i am inserting 500+20% rows but staticcs not updating automaticaly. | |
Nov 19, 2015 at 7:08 | comment | added | Mikael Eriksson | The plan you see might have been in cache before you updated statistics. There are a couple of cases where the plan is not evicted from the cache when statistics are updated. One is If you have "Auto Update Statistics = False" the other is if you have not inserted/updated anything in the table since the last time you updated statistics. (Tested on SQL Server 2014). Test it by modifying one row, update statistics and then execute the query. | |
Nov 19, 2015 at 6:58 | answer | added | Nicolas Souquet | timeline score: 1 | |
Nov 19, 2015 at 6:47 | review | First posts | |||
Nov 19, 2015 at 7:26 | |||||
Nov 19, 2015 at 6:43 | history | asked | Neminath | CC BY-SA 3.0 |