Warning: Constant WP_TEMP_DIR already defined in /var/www/html/blogs/joe/wp-config.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/blogs/joe/wp-config.php:93) in /var/www/html/blogs/joe/wp-includes/feed-rss2-comments.php on line 8
Comments on: MSTVF Fixed Cardinality Value in SQL Server 2014 https://www.sqlskills.com/blogs/joe/mstvf-fixed-cardinality-value-sql-server-2014/ SQL Server Performance Tuning, High Availability and Disaster Recovery Blog Fri, 21 Mar 2014 01:07:43 +0000 hourly 1 https://wordpress.org/?v=6.9.4 By: Joseph Sack https://www.sqlskills.com/blogs/joe/mstvf-fixed-cardinality-value-sql-server-2014/#comment-5811 Fri, 21 Mar 2014 01:07:43 +0000 http://3.209.169.194/blogs/joe/?p=1172#comment-5811 In reply to oracleman consulting.

Hi Earl,

Several good questions. Big topics, so I’ll recommend a few longer references.

First reference I would recommend is “Statistics Used by the Query Optimizer in Microsoft SQL Server 2008” for the full backstory on statistics (http://technet.microsoft.com/en-us/library/dd535534(v=sql.100).aspx). That paper covers the answers to most of your questions. Questions 1, 2, 4 and 5 are addressed in the paper.

Regarding question 3 – there isn’t a direct override (although there are many of us who would like that option). There are tricks for addressing issues and influencing CE, but with varying effectiveness. I talk about the main CE issues I commonly see in the following SQLperformance.com article (http://www.sqlperformance.com/2012/11/t-sql-queries/ten-common-threats-to-execution-plan-quality). If you have Pluralsight access, I go into more detail on them in the SQL Server: Troubleshooting Query Plan Quality Issues course (http://bit.ly/1ikr4mu).

Also – check out Kimberly Tripp’s statistics video (free MCM video) here -> http://bit.ly/1iXaOdn.

Hope this helps.

]]>
By: oracleman consulting https://www.sqlskills.com/blogs/joe/mstvf-fixed-cardinality-value-sql-server-2014/#comment-5810 Fri, 21 Mar 2014 00:17:12 +0000 http://3.209.169.194/blogs/joe/?p=1172#comment-5810 Hi – I am an Oracle DBA not a SQL Server DBA (yet), so please take it easy on me (smile)
Oracle collects stats explicitly via PL/SQL calls. In that call we can set the estimation% and other specifics for going-deep. We do this specifcally based on the DB and apps.
1) is there a 1-way-to-do-it method to collect stats for SQL Server
2) are any collected automatically
3) can you specify things like estimation% (ways to get around this estimation change)
4) can you save off stats, created new stats, find the new ones are bad, and reload the old stats?
5) can you query the stats’ age and completeness in SQL and then alert yourself that you need to gather new stats?

Thanks

]]>