To detriment if your sample statistics is or not (TD 12) you may need to make a HELP STATISTICS statement on you table or column twice, one with full stats and the other after applying the sampling and see the difference
1- To make a help stats on table level:
HELP STATISTICS "tablename";
2- To make a help stats on Column level:
HELP STATISTICS "tablename" Column "columnname";
LinkedIn Profile: http://eg.linkedin.com/pub/mahmoud-karam-pmp-teradata-certified-master/12/348/241
Monday, 13 December 2010
Collect Statistics using sample in TD 12
There is a new feature in TD 12 that you can specify the sample percent you need before running collect stat.
You can do it on the,
1- session level:
DIAGNOSTIC "COLLECTSTATS, SAMPLESIZE=20" ON FOR SESSION;
The above statment means that all collect stats starment with "USING SAMLE" keyword in the session will be collected with 20% (You can change it to what is suitable for your tables).
2- Request level:
DIAGNOSTIC "COLLECTSTATS, SAMPLESIZE=20" ON FOR REQUEST;
That's means it will applyed only on the next collect statment that follows the diagnostic statment.
You can do it on the,
1- session level:
DIAGNOSTIC "COLLECTSTATS, SAMPLESIZE=20" ON FOR SESSION;
The above statment means that all collect stats starment with "USING SAMLE" keyword in the session will be collected with 20% (You can change it to what is suitable for your tables).
2- Request level:
DIAGNOSTIC "COLLECTSTATS, SAMPLESIZE=20" ON FOR REQUEST;
That's means it will applyed only on the next collect statment that follows the diagnostic statment.
Tuesday, 20 July 2010
How to clean / Purge DBQL Tables
delete from DBC.DBQLObjTbl Where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLogTbl where LogonDateTime < '2009-10-01 00:00:00';
delete from DBC.DBQLSqlTbl Where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLExplainTbl where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLStepTbl Where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLSummaryTbl where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLogTbl where LogonDateTime < '2009-10-01 00:00:00';
delete from DBC.DBQLSqlTbl Where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLExplainTbl where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLStepTbl Where CollectTimeStamp < '2009-10-01 00:00:00';
delete from DBC.DBQLSummaryTbl where CollectTimeStamp < '2009-10-01 00:00:00';
Welcome to my teradata world !!
This is my first words in my new Teradata blog,
Actually i worked for a years as Teradata Database Administrator (DBA) and had a lot of experience, problem solving and tips and tricks in Teradata administration on going
I believe that we have to share our knowledge for all as the knowledge in increasing when your share it and decreasing when your keep it for your self
I will do my best to put all my knowledge on your hands.
and I hope that being useful for you
Mahmoud Karam, PMP, Teradata Certified Master
Actually i worked for a years as Teradata Database Administrator (DBA) and had a lot of experience, problem solving and tips and tricks in Teradata administration on going
I believe that we have to share our knowledge for all as the knowledge in increasing when your share it and decreasing when your keep it for your self
I will do my best to put all my knowledge on your hands.
and I hope that being useful for you
Mahmoud Karam, PMP, Teradata Certified Master
Subscribe to:
Posts (Atom)