Solved

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

Posted on 2007-11-20
5
868 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

737 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