3878 | 28 Jul 2015 @ 09:23 PDT | Teradata Applications | Reply | Explain Plan | It's the actual plan.
The actual resource usage (CPU/IO/etc.) can be found in the dbc.QryLogSTepsV.
|
3877 | 28 Jul 2015 @ 09:21 PDT | General | Reply | How to update a datatype of a column in a table having huge data | You should check first if it's allowed (see DDL manual) to change the datatype using Alter Table.
If it's actually allowed it might be possible without modification of the data (e.g. incre... |
3876 | 28 Jul 2015 @ 09:15 PDT | Database | Reply | Teradata Open Query syntax | OPENQUERY is MS SQL Server syntax, which is not supported in Teradata.
|
3875 | 28 Jul 2015 @ 09:13 PDT | Database | Reply | Top percentage group of items, by variable | PERCENT_RANK will not work in your case, it returns a ranking based on the amount, but you need it based on the sum of the amounts, a Cumulative Sum:
qualify
sum(ITEM_AMT)
OVER (PARTIT... |
3874 | 28 Jul 2015 @ 09:06 PDT | Database | Reply | Invalid defaulted table ? | Yep, it's known :-)
http://forums.teradata.com/forum/database/table-aliasing#comment-142030
|
3873 | 27 Jul 2015 @ 12:25 PDT | Database | Reply | Finding and Flagging a record with Non-Latin Characters | How do you define "non-Latin", a character not from the LATIN charset?
TRANSLATE_CHK(col USING UNICODE_TO_LATIN) returns the position of the 1st non-Latin character (or zero).
Oth... |
3872 | 27 Jul 2015 @ 10:09 PDT | Database | Reply | Top percentage group of items, by variable | I don't get what you actually want, can you show some example data?
TOP PERCENT is usually replaced by PERCENT_RANK...
|
3871 | 27 Jul 2015 @ 10:04 PDT | Database | Reply | Performance Tuning | NOT IN might result in a overly complicated plan, but never when using NOT EXISTS.
Of course joining partitioned to non-partitioned tables on their PI is slower than joining tables with same... |
3870 | 26 Jul 2015 @ 04:04 PDT | Database | Reply | Performance Tuning | IN will be rewritten to a JOIN anyway and the optimizer decides if/what/when to sort.
But before you try to change your approach you should find out why/which step is performing bad.
... |
3869 | 25 Jul 2015 @ 04:23 PDT | Database | Reply | Performance improvement | Can you show those existing indexes & partitioning?
And the MERGE plus explain?
|
3868 | 25 Jul 2015 @ 04:20 PDT | Database | Reply | Performance Tuning | You don't have any matching PIs and estimated time is close to actual.
Check QryLogStepsV for the actual vs. estimated numbers and skew.
|
3867 | 25 Jul 2015 @ 01:50 PDT | Database | Reply | Need this tricky logic .. Urgent help | What's your Teradata release?
In TD14.10 there's LAST_VALUE:
SELECT
id,
LAST_VALUE(name ignore NULLS)
OVER (PARTITION BY id
ORDER BY datecol DESC) AS name,
L... |
3866 | 25 Jul 2015 @ 01:38 PDT | Data Modeling | Reply | Generate a database ddl in Teradata v14 | I can't help you with your ERwin issue, but you can get all DDLs without too much cut'n'paste :-)
Open Tools -> Options -> Export and set:
Write all exported answer... |
3865 | 25 Jul 2015 @ 01:03 PDT | Database | Reply | Performance Tuning | #1: Change the NOT IN to a NOT EXISTS:
and NOT EXISTS
(
select *
from xer.xerox_loaded_usg AS u
where src_system in ... |
3864 | 24 Jul 2015 @ 07:18 PDT | Database | Reply | 2620: The format or data contains a bad character | Remove the CAST and check the data returned by the regex.
Your data type allows xxxxxxxx.xx, but your FORMAT only xxxx.xx.
|
3863 | 24 Jul 2015 @ 07:13 PDT | Database | Reply | Maximum page number while exporting data using bteq | If the Page parameter is actually limited to 99999, you might increase the PageLenght instead :-)
|
3862 | 24 Jul 2015 @ 07:10 PDT | Database | Reply | Find the list of active running queries through SQL | The syslib.MonitorSession uses the PMon API, too.
SELECT * FROM TABLE (MonitorSession(-1,'*',0)) dt;
|
3861 | 23 Jul 2015 @ 10:41 PDT | Database | Reply | Maximum page number while exporting data using bteq | Why do you want to export data like this?
Trying to print 2 million pages? :-)
|
3860 | 23 Jul 2015 @ 10:36 PDT | Database | Reply | please help on this scenarios? |
SELECT SPCL_TYP_C AS SPCL_TYPE_CODE, 'Y' AS PRE_IND_CD
FROM SPCL_TYP
WHERE SPCL_TYP_C IS NOT NULL
UNION ALL
SELECT SUB_SPCL_TYPE1, 'N'
FROM SPCL_TYP
WHERE SUB_SPCL_TYPE1 IS ... |
3859 | 23 Jul 2015 @ 10:06 PDT | General | Reply | Querying the data between 2014 and current date | where the_date between DATE '2013-12-31' and current_DATE
|
3858 | 23 Jul 2015 @ 10:05 PDT | Database | Reply | Variable length substring with multiple delimiters | Hi Nik,
in TD14 you can also use a Regular Expression:
REGEXP_SUBSTR(col, '[0-9]+')
|
3857 | 22 Jul 2015 @ 02:56 PDT | Database | Reply | Fill up data from latest previous data untill it changes | What's your TD release?
TD14.10 supports
LAST_VALUE(C1 IGNORE NULLS) OVER (PARTITION BY RESID ORDER BY DT)
|
3856 | 22 Jul 2015 @ 02:55 PDT | Database | Reply | Need help with nested cursors | I don't think there's any vaild reason to nest cursors, can you elaborate why you need it?
|
3855 | 22 Jul 2015 @ 02:53 PDT | Tools | Reply | Bteq Sort Vs SQL Assisstant | This is probably due to different collations, Mainframe might use EBCDIC.
Check the collation returned by HELP SESSION; in BTEQ and use this instead, e.g. SET SESSION COLLATION ASCII;
|
3854 | 22 Jul 2015 @ 02:48 PDT | Database | Reply | help needed in a regular expression | To extract the numeric part you can use this regex:
regexp_substr(site_data_text, '([0-9x]+)')
|