Solved

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

Posted on 2007-11-20
5
862 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

820 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