#DateForumTypeThreadPost
15726 Aug 2015 @ 12:40 PDTDatabaseReplyTime for teradata queryThe "time" in the explain has absolutely no reference to the actual execution time of the query.  The "time" estimates in the explain plan are a measure of how much the que...
15622 Jul 2015 @ 08:18 PDTDatabaseReplyBack to back dates resultThis problem is easy if you use a derived period.  It allows you to use a plethora of period specific functions to answer questions just like this. Check out the TD documentation  http://...
15520 Jul 2015 @ 07:21 PDTTeradata ApplicationsReplydiagnostic helpstats Hi, I'm not Dieter, nor do i play him on TV, but would you be so kind as to clarify what you mean by "It is giving zero processed".   The query is returning zero rows, the diagn...
15420 Jul 2015 @ 07:15 PDTDatabaseReplyThe degradation in performance of query due to Substr functionSachins, You're forcing full table scans when you put a function in the join condition.  TD must evaluate EVERY row to determine what satisifies the condition, thus the overhead and slow ...
15317 Jul 2015 @ 10:48 PDTToolsReplyTPT - Load progress indicationIf your concern is whether or not the job is still running, checking the currentperm of the target and error tables in TDAdmin will let you see if the size of the table is still increasing, thus st...
15216 Jun 2015 @ 06:17 PDTDatabaseReplyPerformance QuestionSomdebroy, It looks like your JI and NUSI aren't being used, as neither are referenced in the explain plan.  Unless you've got other queries that show them being used, you can probabl...
15112 Jun 2015 @ 05:31 PDTDatabaseReplyPerformance QuestionSomdebroy, Can you post the ddl of the underlying tables and some explains?  The explains will help determine if your join indexes are being used by the optimizer, which is where i would sta...
15024 May 2015 @ 06:24 PDTDatabaseReplyTeradata valid date check without udfQuick thought, you  could always do a left outer join to the sys_calendar.calendar view and update the data to the default where col1 is null...
14915 May 2015 @ 06:22 PDTGeneralReplyHow to get most frequently accessed tables in TeradataRad, You need to have access logging turned on in order for the system to gather that data directly.  If you have query logging turned on you can write a grab the 62 characters after the from...
14805 May 2015 @ 08:03 PDTDatabaseReplyExplain Plan : 1=1 join meaningDieter's previous answer still holds, 1=1 will always evaluate to true, thus a dummy join condition inserted as the result of an unconstrained full outer join (cross-join) Cheers
14730 Apr 2015 @ 07:11 PDTDatabaseReplyMERGE INTO and trigger firingWhat error message are you getting? The documentation illustrates the ORDER of the triggers.  If you code the insert portion of the merge first, followed by the update, the insert before trig...
14630 Apr 2015 @ 06:59 PDTDatabaseReplyreject records needs to be collected in a tableInsert all the records into a "staging" table with wide varchar columns, wide enough to absorb your longest data for the column, assume every record is an error record.  From there s...
14530 Apr 2015 @ 06:46 PDTDatabaseReplyQuery PerformanceAbhishek, What version of TD are you running?  Sounds like an opportunity for some vertical partitioning. Can you post the ddl? Cheers, Blaine
14425 Apr 2015 @ 01:21 PDTDatabaseReplyaggregate function based on multiple rows Johnsnow, Try this...(you'll need to change the table names, but it works... SELECT a.state ,a.weeknum ,a.yearnum ,a.sales AS TY_sales ,b.Sales AS LY_Sales FROM (SEL...
14322 Apr 2015 @ 11:59 PDTData ModelingReplyTable with Primary key and Primry IndexTDArc, The Primary key is being used as a USI.  If you run the following query,  select * from dbc.indices where trim(tablename) = 'src_tot_trl' and trim(databasename) = 'ww...
14221 Apr 2015 @ 09:22 PDTData ModelingReplyTable with Primary key and Primry IndexTDArc, Can you post the DDL?
14121 Apr 2015 @ 09:22 PDTDatabaseReplyStats Collectionyou should be able to set up automated stats collection via viewpoint.  there's no need to run anything else, especially a cursor.  row by row cursors force TD into single threaded pr...
14021 Apr 2015 @ 05:34 PDTDatabaseReplyStats CollectionKishore, What version of TD are you running?
13917 Apr 2015 @ 06:35 PDTDatabaseReplyreplace 3rd and 9th position In a string Ep, If it's always the third and ninth position in the string, use this...substring(columnname from 1 for 2)||'$'||substring (columnname from 4 for 5)||'#'. cheers  
13806 Apr 2015 @ 08:10 PDTDatabaseReplyLoading to the same target table simultaneouslyYou could build a union view on the source tables and insert into the target table from the union view.  As Dieter pointed out, you shouldn't need any utility to load the data once it'...
13728 Mar 2015 @ 07:51 PDTDatabaseReplyTo split the data in percentage in large table and to load to subtablesHow are you defining the first 25%? Is there some criteria in play? or just the top 25% of the rows?
13627 Mar 2015 @ 10:13 PDTGeneralReplyIs there a way to avoid NOT IN function select a.* from table_a a left outer join table_b b on (a.id=b.id) where b.id is null;
13513 Mar 2015 @ 06:30 PDTDatabaseReplyMerge History tables and alligning the time periodsHi Suresh, It's difficult to understand how you're building the final table from the example you posted, but from what you've described, I advise you to spend some time familiarizing y...
13412 Mar 2015 @ 06:41 PDTDatabaseReplyIncorrect Teradata explain estimatesThe time it takes for a query to execute has nothing to do with the labels used in teh explain plan. There is absolutey no correlation between the labels on the cost values in an explain plan and ...
13311 Mar 2015 @ 08:31 PDTToolsReplyMload Update: Records are not getting updatedYou're not really setting anything new here, other than the "or"  lines in the where clause.  Your query says set the start_dt_tm = :in_dt_tm, type_cd = :in_type_cd and line...

Pages