#DateForumTypeThreadPost
215313 Aug 2013 @ 02:18 PDTDatabaseReplySize of table with partial data (active records)The easiest way to get an average row size for a populated table is always size/count. So just get the size from dbc.TableSizeV and calculate the percentage assigned to those active rows based on ...
215213 Aug 2013 @ 02:15 PDTDatabaseReplyCollect StatisticsCould you show the output (preferably BTEQ) including the actual error message? This should run. Dieter
215113 Aug 2013 @ 02:15 PDTDatabaseReplyDELETE FROM PPI - VERY SLOWHi Suhail, #1: full partition DELETE should ru without TJ unless there are Foreign Keys, Triggers, Join/Hash Indexes. #2: Of course there will be TJ because it's not deleting all rows from th...
215013 Aug 2013 @ 02:14 PDTDatabaseReplyVariable length Columns vs Fixed lengthThere's four bytes overhead for the first variabe column and two bytes for each additional VarChar. So VarChars are used when the average length of the string is at least two bytes le...
214911 Aug 2013 @ 01:21 PDTDatabaseReplyIssue with Rank/row_number in tableEach RANK will be a seperate step in explain and each step will spool all the rows twice.   What datatypes are the PARTITION/ORDER BY columns? VARCHARs are expanded to CHARs in that case, th...
214811 Aug 2013 @ 01:14 PDTConnectivityReplyUnable to connect to teradata sql assistant 13.10You need a Teradata server SQL Assistant is just a client. Did you download Teradata Express and follow the instructions? http://downloads.teradata.com/download/database/teradata-express/vmware ...
214709 Aug 2013 @ 03:01 PDTDatabaseReplyTo check ALL condition in TeradataHi Sagar, this QUALIFY will return only group M. If not, you did something wrong, so better show your actual query.   Dieter
214609 Aug 2013 @ 02:12 PDTDatabaseReplyUSI VS NUSIHi Naveen, SIs in Teradata are rarely used for Joins (different to other DBMSes), so they're usually implemented to get a faster (index-based) access (this is the same in any other DBMS)....
214509 Aug 2013 @ 02:04 PDTDatabaseReplyForming Groups which are circular in natureHi Sagar, for me assumimg is easy, but it's hard for SQL :-) There must be a SQL-condition to find the starting point.   Dieter
214409 Aug 2013 @ 02:02 PDTDatabaseReplyTo check ALL condition in TeradataHi Sagar, simply add: SELECT .... QUALIFY MIN(MEMBER_FLAG) OVER (PARTITION BY GROUP_ID) = 'Y' AND MIN(MEMBER_FLAG) OVER (PARTITION BY GROUP_ID) = MAX(MEMBER_FLAG) OVER (PA...
214309 Aug 2013 @ 01:59 PDTConnectivityReplyviewpoint connectionHi Jesse, are all Viewpoint services running? /opt/teradata/viewpoint/bin/vp-control.sh status By default it's disabled on TD Express and you need to assign at least 2,5 GB RAM to the VM b...
214207 Aug 2013 @ 04:09 PDTDatabaseReplyPPI or NUSI?Hi Nishant, access with partitioned column alone (with out PI) will not be that much efficient as it would have been with PI + partioned column.. agree? No. When only the partitioning column...
214107 Aug 2013 @ 03:56 PDTDatabaseReplyHow to reduce skew factor on stage tables with NoPI?In TD14 there's also a new option for INSERT/SELECT into NoPI tables, HASH BY RANDOM, to reduce skew.   Dieter
214007 Aug 2013 @ 03:54 PDTToolsReplyHow to create our own database in TeradataThe same syntax as always: CREATE DATABASE db [FROM owner] AS PERM = xxx;   Dieter
213907 Aug 2013 @ 03:53 PDTDatabaseReplyDynamic SQL - Stored ProcedureYou're right, your code is not working. And the error is easy to spot :-) You expect us to fix it without even telling the error message?   Dieter
213807 Aug 2013 @ 03:41 PDTDatabaseReplyAnalytical ordered function to get the first row in windowHi Abin, your data/expected result is not readable, better provide DDL + INSERTs. Might there be multiple rows with 'transfer' before the 'load'? If yes, which one to choose, the...
213707 Aug 2013 @ 02:18 PDTGeneralReplyQuery disobeying conditions?Without the GROUP/MAX you get one row per account_number/service_type, so this updates all accounts where any of those service_types exists.  There's another solution to get an account wh...
213604 Aug 2013 @ 09:07 PDTDatabaseReplyQuery Tuning:PPI not being used in select#1: When the query is optimized the actual values are not yet know when they come from another table. Btw, in TD14.10 there's a new feature "Incremental Planning" which will resolve s...
213504 Aug 2013 @ 08:52 PDTDatabaseReplyPPI or NUSI?If you add a yr_mon column you probably keep your date column resulting in doubling the diskspace, 4 (date) -> 8 (date+int) bytes. If users want to access a year they still have to write a cond...
213404 Aug 2013 @ 08:29 PDTDatabaseReplyUNION Vs MSRWhen you read the Explain you'll easily see that your assumption is correct. I'd suggest start reading manuals and explains: SQL Data Manipulation Language Chapter 3: Statement Syntax L...
213304 Aug 2013 @ 08:25 PDTExtensibilityReplyREGEXP_REPLACEThe functions in td_sysfnlib are like built-in functions, you don't need any access right to use them and the right can't be revoked, too. Dieter
213204 Aug 2013 @ 08:21 PDTDatabaseReplyHow do i create a full anonymous procedure (one-time execution from unix)The concept of "anonymous blocks" doesn't exist in Teradata. Why do you think you need it? You need to talk to your DBA, he might grant you the neccessary rights, good luck :-) Btw,...
213104 Aug 2013 @ 08:12 PDTTeradata StudioReplyDate Error in Syntax - HelpWhat are you trying to do? There's only one recommended way to write a date: DATE '2012-05-01' anything else is error-prone. select WeekStartDate BETWEEN ('5/1/201...
213002 Aug 2013 @ 10:47 PDTDatabaseReplyQuery Tuning:PPI not being used in selectIf it's actually a single row table (doesn't match your join condition: on tab1.cola=tab2.colb and tab1.date1 between tab2.date1 and tab2date2) you can replace it with a view as d...
212902 Aug 2013 @ 10:40 PDTDatabaseReplyQuery Tuning:PPI not being used in selectPartition elimination tries to eliminate partitions which are not used at all from a scan, but for each "tab.cola" there might be another pair of dates in tab2. Thus the best thing y...

Pages