Solved

Missing Column Statistics Error in Trace When DB Has Auto Create Statistics ON

Posted on 2007-11-20
5
857 Views
Last Modified: 2010-04-21
How can this be?  Isn't the purpose of Auto Create Statistics to avoid this situation?
0
Comment
Question by:kreilkamp
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:RWrigley
ID: 20325275
Depends...is Auto Update Statistics also turned on?
0
 

Author Comment

by:kreilkamp
ID: 20328267
Both Auto Create Statistics and Auto Update Statistics have been enabled for about a year, but the trace from the day before yesterday shows a number of Missing Column Statistics errors.
0
 
LVL 12

Accepted Solution

by:
RWrigley earned 500 total points
ID: 20328928
Can you post a couple of the actual errors?  Auto Create statistics only creates the stastistics for a column if that column is used in a Where clause, so its possible that you could have columns that have no statistics (because they've never been referenced in a where clause).  However, my understanding of the auto-create is that if its turned on, you shouldn't see these errors.
0
 

Author Comment

by:kreilkamp
ID: 20430606
Sorry this took so long . . .

1st Error:

EventClass: Missing Column Statistics
TextData:  NO STATS:([regionheader].[rgh_name])

Previous statement for same ClientProcessID:

EventClass:  SQL:BatchStarting

TextData:

SELECT regionheader.rgh_name, regionheader.rgh_id, regionheader.rgh_type
FROM regionheader
WHERE (((regionheader.rgh_type = 1)))
      UNION  
SELECT 'UNKNOWN','UNK',0  

2nd Error:

EventClass:  Missing Column Statistics
TextData:  NO STATS:([invoiceselection].[ivs_sequence],
[invoiceselection].[ivs_copies],
[invoiceselection].[ivs_showactualtype],
[invoiceselection].[ivs_logocompanyname],
[invoiceselection].[ivs_logocompanyloc],
[invoiceselection].[ivs_logocompanyfontsize],
[invoiceselection].[ivs_logopicturefile],
[invoiceselection].[ivs_remittocompanyname],
[invoiceselection].[ivs_remittocompanyloc],
[invoiceselection].[ivs_terms],
[invoiceselection].[ivs_interestrate],
[invoiceselection].[ivs_imageformat],
[invoiceselection].[ivs_daysdue],
[invoiceselection].[ivs_sequence],
[invoiceselection].[ivs_copies],
[invoiceselection].[ivs_showactualtype],
[invoiceselection].[ivs_logocompanyname],
[invoiceselection].[ivs_logocompanyloc],
[invoiceselection].[ivs_logocompanyfontsize],
[invoiceselection].[ivs_logopicturefile],
[invoiceselection].[ivs_remittocompanyname],
[invoiceselection].[ivs_remittocompanyloc],
[invoiceselection].[ivs_terms],
[invoiceselection].[ivs_interestrate],
[invoiceselection].[ivs_imageformat],
[invoiceselection].[ivs_daysdue])

Previous statement for same ClientProcessID:

EventClass:  SQL:BatchStarting
TextData:
SELECT ivh_revtype1,
 ivs_sequence,
 ivs_copies,
 ivs_showactualtype,
 ivs_invoicedatawindow,
 ivs_logocompanyname,
 ivs_logocompanyloc,
 ivs_logocompanyfontsize,
 ivs_logopicturefile,
 ivs_remittocompanyname,
 ivs_remittocompanyloc,
 ivs_terms,
 ivs_invoicetype,
 ivs_interestrate,
 cmp_id,
 ivs_imageformat,
 ivs_company,
 ivs_daysdue  
from invoiceselection  
left outer join company
on ivs_number = cmp_mbformat  
where ivs_invoicetype = 'M'  
        union  
SELECT ivh_revtype1,
 ivs_sequence,
 ivs_copies,
 ivs_showactualtype,
 ivs_invoicedatawindow,
 ivs_logocompanyname,
 ivs_logocompanyloc,
 ivs_logocompanyfontsize,
 ivs_logopicturefile,
 ivs_remittocompanyname,
 ivs_remittocompanyloc,
 ivs_terms,
 ivs_invoicetype,
 ivs_interestrate,
 cmp_id,
 ivs_imageformat,
 ivs_company,
 ivs_daysdue  
FROM invoiceselection  
left outer join company
on ivs_number = cmp_ivformat  
where ivs_invoicetype = 'I'
0
 

Author Closing Comment

by:kreilkamp
ID: 31410261
Thank you for responding.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question