我收到以下错误消息,但我不知道为什么。任何有关如何避免此错误的建议都是首选。我今天已经收到三次此错误消息。我认为我可能必须先获取ACCT_DIM_NB,然后运行查询。谢谢
ERROR: Teradata row not delivered (trget): The request was aborted by an ABORT SESSION command.
下面使用的代码。
SELECT
A.ACCT_DIM_NB,
C.ACCT_NB,
B.CS_TXN_CD,
A.TXN_AM,
A.DAY_TIME_DIM_NB,
A.TXN_DESCRIPTION
FROM ICDW_CB_PRSN_V.DDM_FCT_TXN AS A
INNER JOIN ICDW_CB_PRSN_V.DDM_DIM_TXN AS B
ON A.TXN_DIM_NB=B.TXN_DIM_NB
INNER JOIN ICDW_CB_PRSN_V.DDM_DIM_ACCT_DTL AS C
ON A.ACCT_DIM_NB=C.ACCT_DIM_NB
INNER JOIN
(SELECT DISTINCT ACCT_NB FROM myid.temptable1) D
ON CAST(C.ACCT_NB AS BIGINT) = CAST(D.ACCT_NB AS BIGINT)
WHERE B.CS_TXN_CD IN ('387','388','389','390')
AND A.DAY_TIME_DIM_NB GE '2013-01-01'
AND A.TIME_DIM_NB BETWEEN '2013-01-01' AND '2050-01-01'
AND INDEX(UPPER(TXN_DESCRIPTION),'REVERSAL:')=0
答案 0 :(得分:0)
1) First, we lock myid.CB9019388E1 for access, we lock
ICDW_CB_PRSN_T.acct in view ICDW_CB_PRSN_V.DDM_FCT_TXN for access,
we lock ICDW_CB_PRSN_T.txn in view ICDW_CB_PRSN_V.DDM_FCT_TXN for
access, we lock ICDW_CB_PRSN_T.DDM_DIM_ACCT_DTL in view
ICDW_CB_PRSN_V.DDM_DIM_ACCT_DTL for access, and we lock
ICDW_CB_PRSN_T.DDM_DIM_TXN in view ICDW_CB_PRSN_V.DDM_DIM_TXN for
access.## Heading ##
2) Next, we do an all-AMPs SUM step to aggregate from
myid.CB9019388E1 by way of an all-rows scan with a condition of
("NOT (myid.CB9019388E1.ACCT_NB IS NULL)")
, grouping by field1 ( myid.CB9019388E1.ACCT_NB). Aggregate
Intermediate Results are computed locally, then placed in Spool 3.
The size of Spool 3 is estimated with low confidence to be 3,335
rows (1,377,355 bytes). The estimated time for this step is 0.01
seconds.
3) We do an all-AMPs RETRIEVE step from Spool 3 (Last Use) by way of
an all-rows scan into Spool 1 (used to materialize view, derived
table, table function or table operator D) (all_amps) (compressed
columns allowed), which is built locally on the AMPs. The size of
Spool 1 is estimated with low confidence to be 3,335 rows (
737,035 bytes). The estimated time for this step is 0.01 seconds.
4) We execute the following steps in parallel.
1) We do an all-AMPs RETRIEVE step from Spool 1 (Last Use) by
way of an all-rows scan with a condition of ("NOT (D.ACCT_NB
IS NULL)") into Spool 6 (all_amps) (compressed columns
allowed), which is duplicated on all AMPs. The size of Spool
6 is estimated with low confidence to be 4,942,470 rows (
1,057,688,580 bytes). The estimated time for this step is
0.37 seconds.
2) We do an all-AMPs RETRIEVE step from
ICDW_CB_PRSN_T.DDM_DIM_ACCT_DTL in view
ICDW_CB_PRSN_V.DDM_DIM_ACCT_DTL by way of an all-rows scan
with no residual conditions into Spool 7 (all_amps)
(compressed columns allowed), which is built locally on the
AMPs. The size of Spool 7 is estimated with high confidence
to be 176,214,248 rows (7,400,998,416 bytes). The estimated
time for this step is 0.73 seconds.
5) We do an all-AMPs JOIN step from Spool 6 (Last Use) by way of an
all-rows scan, which is joined to Spool 7 (Last Use) by way of an
all-rows scan. Spool 6 and Spool 7 are joined using a single
partition hash join, with a join condition of (
"(TRANSLATE((ACCT_NB )USING LATIN_TO_UNICODE)(BIGINT, FORMAT
'-(19)9'))= (TRANSLATE((ACCT_NB )USING LATIN_TO_UNICODE)(BIGINT,
FORMAT '-(19)9'))"). The result goes into Spool 8 (all_amps)
(compressed columns allowed), which is built locally on the AMPs.
Then we do a SORT to order Spool 8 by the hash code of (
ICDW_CB_PRSN_T.DDM_DIM_ACCT_DTL.ACCT_DIM_NB). The size of Spool 8
is estimated with low confidence to be 3,336 rows (136,776 bytes).
The estimated time for this step is 0.11 seconds.
6) We do an all-AMPs JOIN step from Spool 8 (Last Use) by way of a
RowHash match scan, which is joined to 74 partitions of
ICDW_CB_PRSN_T.acct in view ICDW_CB_PRSN_V.DDM_FCT_TXN by way of a
RowHash match scan with a condition of ("(ICDW_CB_PRSN_T.acct in
view ICDW_CB_PRSN_V.DDM_FCT_TXN.TIME_DIM_NB >= DATE '2013-01-01')
AND (ICDW_CB_PRSN_T.acct.TIME_DIM_NB <= DATE '2019-01-31')").
Spool 8 and ICDW_CB_PRSN_T.acct are joined using a sliding-window
merge join, with a join condition of (
"ICDW_CB_PRSN_T.acct.ACCT_DIM_NB = ACCT_DIM_NB"). The result goes
into Spool 9 (all_amps) (compressed columns allowed), which is
built locally on the AMPs. The size of Spool 9 is estimated with
low confidence to be 73,453 rows (3,893,009 bytes). The estimated
time for this step is 0.33 seconds.
7) We execute the following steps in parallel.
1) We do an all-AMPs JOIN step from Spool 9 (Last Use) by way of
an all-rows scan, which is joined to rows (DAY_TIME_DIM_NB)
values (DATE '2019-01-31'), (DATE '2019-01-30'), (DATE
'2019-01-29'), (DATE '2019-01-28')
Spool 9 and rows are joined using a product join, with a join
condition of ("(1=1)"). The result goes into Spool 10
(all_amps) (compressed columns allowed), which is
redistributed by the rowkey of (
ICDW_CB_PRSN_T.acct.TIME_DIM_NB,
ICDW_CB_PRSN_T.DDM_DIM_ACCT_DTL.ACCT_DIM_NB, DAY_TIME_DIM_NB)
to all AMPs. Then we do a SORT to partition Spool 10 by
rowkey. The size of Spool 10 is estimated with low
confidence to be 163,212,566 rows (9,303,116,262 bytes). The
estimated time for this step is 1.49 seconds.
2) We do an all-AMPs RETRIEVE step from
ICDW_CB_PRSN_T.DDM_DIM_TXN in view ICDW_CB_PRSN_V.DDM_DIM_TXN
by way of an all-rows scan with a condition of (
"ICDW_CB_PRSN_T.DDM_DIM_TXN in view
ICDW_CB_PRSN_V.DDM_DIM_TXN.CS_TXN_CD IN ('387 ',
'388 ','389
','390 ')") into Spool 11 (all_amps) (compressed columns
allowed), which is duplicated on all AMPs. Then we do a SORT
to order Spool 11 by the hash code of (
ICDW_CB_PRSN_T.DDM_DIM_TXN.TXN_DIM_NB). The size of Spool 11
is estimated with low confidence to be 145,236 rows (
3,630,900 bytes). The estimated time for this step is 0.00
seconds.
8) We do an all-AMPs JOIN step from 2222 partitions of
ICDW_CB_PRSN_T.txn in view ICDW_CB_PRSN_V.DDM_FCT_TXN by way of a
RowHash match scan with a condition of ("(ICDW_CB_PRSN_T.txn in
view ICDW_CB_PRSN_V.DDM_FCT_TXN.TIME_DIM_NB >= DATE '2013-01-01')
AND (((INDEX(UPPER((ICDW_CB_PRSN_T.txn in view
ICDW_CB_PRSN_V.DDM_FCT_TXN.TXN_DESCRIPTION )),'REVERSAL:'))= 0)
AND (ICDW_CB_PRSN_T.txn in view
ICDW_CB_PRSN_V.DDM_FCT_TXN.TIME_DIM_NB <= DATE '2019-01-31'))"),
which is joined to Spool 10 (Last Use) by way of a RowHash match
scan. ICDW_CB_PRSN_T.txn and Spool 10 are joined using a
rowkey-based merge join, with a join condition of ("(ACCT_DIM_NB =
ICDW_CB_PRSN_T.txn.ACCT_DIM_NB) AND ((TIME_DIM_NB =
ICDW_CB_PRSN_T.txn.TIME_DIM_NB) AND ((TIME_DIM_NB >=
ICDW_CB_PRSN_T.txn.DAY_TIME_DIM_NB) AND
((ICDW_CB_PRSN_T.txn.ACCT_DIM_NB = ACCT_DIM_NB) AND
(DAY_TIME_DIM_NB = ICDW_CB_PRSN_T.txn.DAY_TIME_DIM_NB ))))"). The
input table ICDW_CB_PRSN_T.txn will not be cached in memory, but
it is eligible for synchronized scanning. The result goes into
Spool 12 (all_amps) (compressed columns allowed), which is built
locally on the AMPs. Then we do a SORT to order Spool 12 by the
hash code of (ICDW_CB_PRSN_T.txn.TXN_DIM_NB). The size of Spool
12 is estimated with no confidence to be 1,131,190 rows (
211,532,530 bytes). The estimated time for this step is 1 minute
and 44 seconds.
9) We do an all-AMPs JOIN step from Spool 11 (Last Use) by way of a
RowHash match scan, which is joined to Spool 12 (Last Use) by way
of a RowHash match scan. Spool 11 and Spool 12 are joined using a
merge join, with a join condition of ("TXN_DIM_NB = TXN_DIM_NB").
The result goes into Spool 5 (group_amps), which is built locally
on the AMPs. The size of Spool 5 is estimated with no confidence
to be 35,048 rows (6,904,456 bytes). The estimated time for this
step is 0.01 seconds.
10) Finally, we send out an END TRANSACTION step to all AMPs involved
in processing the request.
-> The contents of Spool 5 are sent back to the user as the result of
statement 1. The total estimated time is 1 minute and 47 seconds.
答案 1 :(得分:0)
您的查询占用大量假脱机,并被管理员中止。尝试就此问题与Teradata管理员联系,或将查询分解成小块并进行优化。