Posted 02 Oct 2014
The accuracy of sample statistics has been greatly improved over the last Teradata releases. So I usually try to use sample stats on most of the big tables and I found them to be reliable on many columns, not only the officially recommended unique or nearly-unique columns, e.g. on DATEs. But there is a specific scenario when sample stats result in worst case optimizer plans: |
Thank you Dieter
|
Posted 31 Aug 2013
Beginning with TD14 statistics are no longer stored in dbc.TVFields and dbc.Indexes, they have been moved into dbc.StatsTbl to facilitate several enhancements. A new view dbc.StatsV returns much of the information previously extracted in my StatsInfo query. But of course this is still not enough information, at least not for me ;-) |
Posted 29 Aug 2013
To add or drop a column or modify the list of compressed values of an existing table is a quite expensive operation. For a large table it might result in a huge amount of CPU and IO usage and a loooooooong runtime. This blog discusses the pros and cons of the different ways to do it. |
Posted 12 Jul 2013
In a recent topic in the forums there was a question on "how to spell out numeric values in english" and an excerpt from the manuals indicating there is a format for the new TO_CHAR function in TD14: "Any numeric element followed by SP is spelled in English words." |
Posted 19 Oct 2012
When you start designing a statistics collection process topics include:
Both problems involve some kind of prioritization process, which finally leads to a sorted list of COLLECT STATS statement (See Marcio Moura's blog When is the right time to refresh statistics?) Processing this list (using a BTEQ script or a cursor in a Stored Procedure) could lead to another problem: |
Posted 27 Dec 2011
Collected statistics are a valuable source of information in Teradata, not only for the optimizer, but also for developers or DBAs. Spotting outdated statistics (which might lead to bad optimizer plans) and implementing/monitoring a stats recollection process are common tasks, which need the current statistics as input. |
Posted 21 Jun 2011
In my previous posts on missing functions i covered SQL:2008 DENSE_RANK and CUME_DIST & NTILE. |
Posted 25 May 2011
In my previous post i covered some ranking functions including SQL:2008 RANK, ROW_NUMBER & DENSE_RANK. But Standard SQL defines three additional functions based on ranking: |
Posted 16 May 2011
Some of the SQL:2008 analytical functions are not implemented in Teradata, but most of them can be re-written using existing features. |
Posted 14 Mar 2011
The commonly known technique to pass parameters to SQL statements at the system or session level utilizes tables (permanent or global temporary tables). |