Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
How to find (or create) the stats_stream,...
How to find (or create) the stats_stream, rowcount, and pagecount used in Update Statistics
Rate Topic
Display Mode
Topic Options
Author
Message
hmbmeister
hmbmeister
Posted Tuesday, January 15, 2013 3:06 PM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:05 PM
Points: 9,
Visits: 32
I have been asked to script out the creation of specific tables in the database including primary key, nonclustered indexes, all constraints, and statistics. I am almost done with it except for the update statistics.
I can't find any information on how to find (or create) the hex stats_stream on a specific statistic. Anyone know how that is created?
I need the stats_stream, rowcount, and pagecount.
Example below:
UPDATE STATISTICS [dbo].[StgVendItem]([XIE1StgVendItem]) WITH STATS_STREAM = 0x01000000040000000000000000000000B98268400000000088000000000000000000000000000000380100003800000004000A00000000000000000000000000A7020000A70000000C0000000000000008D0003400000000A7020000A70000001E0000000000000008D0003400000000380100003800000004000A00000000000000000000000000, ROWCOUNT = 0, PAGECOUNT = 0
Post #1407506
Vedran Kesegic
Vedran Kesegic
Posted Tuesday, January 15, 2013 6:35 PM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 6:00 PM
Points: 343,
Visits: 1,077
From BOL: "Not supported. Future compatibility is not guaranteed."
http://msdn.microsoft.com/en-us/library/ms187348.aspx
Why don't you just create and/or refresh statistics to get realistic data ?
You could update system tables using dedicated admin connection (put "admin:" in front of server name) and starting the sql instance in single-user mode ("-m;" startup parameter), but why doing such invasive stuff when you can probably go with normal, supported methods?
_____________________________________________________
XDetails Addin
- for SQL Developers and DBA
blog.sqlxdetails.com
- Transaction log myths - debunked!
Post #1407539
Sean Pearce
Sean Pearce
Posted Wednesday, January 16, 2013 3:15 AM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 2:27 AM
Points: 350,
Visits: 1,340
DBCC SHOW_STATISTICS(N'[dbo].[StgVendItem]', N'XIE1StgVendItem')
WITH STATS_STREAM
http://thesqlguy.blogspot.com/
Post #1407717
Vedran Kesegic
Vedran Kesegic
Posted Wednesday, January 16, 2013 5:06 AM
Old Hand
Group: General Forum Members
Last Login: Yesterday @ 6:00 PM
Points: 343,
Visits: 1,077
Nice article here:
http://blog.kejser.org/2011/07/07/the-ascending-column-problem-in-fact-tables-part-two-stat-job/
Still - unsupported, so you use it on your own risk.
_____________________________________________________
XDetails Addin
- for SQL Developers and DBA
blog.sqlxdetails.com
- Transaction log myths - debunked!
Post #1407759
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.