Skip to main content
Notice removed Reward existing answer by Paul White
Bounty Ended with Rob Dalzell's answer chosen by Paul White
Notice added Reward existing answer by Paul White
Bounty Started worth 150 reputation by Paul White
Bumped by Community user
Notice removed Draw attention by Paul White
Notice added Draw attention by Erik Reasonable Rates Darling
Bumped by Community user
Incorporated comment
Source Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers.

New statistics were created for COL_GROUP. My NORECOMPUTE statistic was not updated. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

I know about sp_autostats but I need something to prevent the creation of automatic statistics. sp_autostatssp_autostats only prevents the statistics from being auto-updated.

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

I know about sp_autostats but I need something to prevent the creation of automatic statistics. sp_autostats only prevents the statistics from being auto-updated.

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers.

New statistics were created for COL_GROUP. My NORECOMPUTE statistic was not updated. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

I know about sp_autostats but I need something to prevent the creation of automatic statistics. sp_autostats only prevents the statistics from being auto-updated.

Tweeted twitter.com/StackDBAs/status/838858392634552320
incorporate comment
Source Link
Tom V
  • 15.7k
  • 7
  • 64
  • 87

I know about sp_autostats but I need something to prevent the creation of automatic statistics. sp_autostats only prevents the statistics from being auto-updated.

I know about sp_autostats but I need something to prevent the creation of automatic statistics. sp_autostats only prevents the statistics from being auto-updated.

clarified problem
Source Link
Joe Obbish
  • 32.6k
  • 4
  • 74
  • 153

If you want to suggest alternatives to preventing statistics creation keep in mind that the table is used in a view referenced by thousands of different queries. I do not have control over the queries that are run.

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

If you want to suggest alternatives to preventing statistics creation keep in mind that the table is used in a view referenced by thousands of different queries. I do not have control over the queries that are run.

My initial strategy was to create statistics on the column with the NOCOMPUTE and SAMPLE 0 ROWS options. I was under the impression that SQL Server would not automatically create statistics on a column that already has a statistics object, but this has happened on our dev and QA servers. I don't know why the statistics were created and I've been unable to trigger that myself by running queries.

Source Link
Joe Obbish
  • 32.6k
  • 4
  • 74
  • 153
Loading