Solved

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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

724 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