Well. It is an option for very large tables where statistics have no impact on the execution plan chosen, or the plan is forced, or forcing hints are used.
There aren't always sensible cost-based choices to be made.
And there's sometimes not much value in trying to summarise billions of rows of data in a maximum of 201 histogram steps.
I think the trick is to create the user-defined statistic using the same name that the equivalent auto-generated statistic would take.
In my testing, when the correctly-named user-defined Statistic exists, an auto-generated one doesn't get created.
I'm using 15.0.4102.2 with your trace flags 2371...
On a SQL Server 2016 SP3 database, we have several (under 10) tables with billions of records.
It's a 24/7 system with limited maintenance windows so it's essential that user impact is limited while updating statistics.
What would be the proper/safe way to get statistics updated using Ola Halleng...
During testing I deselected the sysadmin rights for my login and now can't re-add it (because I don't have sysadmin rights).
There are no other sysadmin accounts for the instance except the [sa] account.
I was set up for just Windows Authentication so I hacked the LoginMode in the registry to 2 s...
I have inherited an old SQL Server 2008 R2 where SA login is disabled. No other logins gives access to master db, so I cannot really gain access to administrative stuff (create new logins, change login method etc). And at the same time, I cannot enable SA login either from SSMS.
How to proceed to...
@ErikDarling Yea that was our use cases when I worked FinTech. It's how we survived on 16 GB of Memory for a 1.5 TB database lol. Columnstore was very helpful too.
@ErikDarling Only a few developers were allowed to query the database, and they had a rule of thumb to not let anything run longer than a minute that was ad-hoc. I typically helped tune their ad-hoc stuff otherwise, so it was a pretty well controlled ecosystem.
I am currently investigating a repeating error which occurs on the secondary Replica of our 2 node Alwasy on High Availability cluster. The Replica is set up with Read-Intent only because we use a separate Backup solution (Dell Networker).
The Tempdb keeps growing in the secondary replica because...
it would be great to be able to turn off all deprecated behavior via connection string settings, ala DeprecatedFeatures=None
although I guess the Deprecated Features perf counter does a pretty good job of keeping track of the number of deprecated features that are being used.
SELECT *
FROM sys.dm_os_performance_counters dopc
WHERE dopc.object_name LIKE '%SQL%Deprecated Features%';
and XE has pretty good support for it to, via ADD EVENT sqlserver.deprecation_final_support and ADD EVENT sqlserver.deprecation_announcement
> Hope this helps someone else and also serve as a lesson that when you contact Microsoft support, be prepared to do a lot of your own investigation unprompted and send it over to them, it really helped speed up the process. (from here)
@HannahVernon "at one point they told me that replication is not designed to replicate functions and stored procedures and to just not replicate them" - Lol.
@HannahVernon "While you're in there, may as well add the semi-colons, too if you really want to protect your code 10 years into the future. - answered Apr 4, 2013, Aaron Bertrand". Closing in real close on 10 years, maybe Microsoft needs 10 more.
What's really amazing is that all of those peppers are in just 3 species. All those bonnet peppers are the same species. And bell pepper/jalapeno/poblano/cayenne all same species
3 months is too long to even reheat it in the microwave, though
I dried a lot of that (you can see some sundried themselves a bit) and ground it and put it in a jar.
Once we get back over to other house, I have to move the kids' playhouse somehow and then totally redo the raised beds - they are all overgrown with weeds and then killed from the hard freeze. And then replant.