Soonyoung Lee |
Performance Characteristics of Teradata RDBMS
1. Contrast with conventional Databases
Performance becomes
extremely important when handling complex queries and large amount of data.
Teradata's excellent performance is due to the parallelism- it loads
data, processes data and backs up data in parallel.
Explanation
---------------------------------------------------------------------------
1) First, we
lock a distinct customer_service."pseudo table" for read
on a RowHash to prevent global
deadlock for customer_service.ep.
2) Next, we lock a
distinct customer_service."pseudo table" for read
on a
RowHash to prevent global deadlock for customer_service.e.
3) We lock a
distinct customer_service."pseudo table" for read on a
RowHash to prevent global deadlock
for customer_service.c.
4) We lock
customer_service.ep for read, we lock customer_service.e
for read, and we lock
customer_service.c for read.
5) We execute the
following steps in parallel.
1) We do an all-AMPs
RETRIEVE step from customer_service.c by
way of
an all-rows scan with a condition of (
"customer_service.c.customer_name = 'First American Bank'")
into
Spool 2, which is redistributed by hash code to all AMPs.
Then we
do a SORT to order Spool 2 by row hash. The size of
Spool 2
is estimated with no confidence to be 8 rows. The
estimated time for this step is 0.03 seconds.
2) We do an all-AMPs JOIN
step from customer_service.ep by way
of a
RowHash match scan with no residual conditions, which is
joined
to customer_service.e. customer_service.ep and
customer_service.e are joined using a merge join, with a join
condition of ("customer_service.e.employee_number =
customer_service.ep.employee_number"). The result goes
into
Spool
3, which is redistributed by hash code to all AMPs.
Then we
do a SORT to order Spool 3 by row hash. The size of
Spool 3
is estimated with low confidence to be 80 rows. The
estimated time for this step is 0.06 seconds.
6) We do an all-AMPs
JOIN step from Spool 2 (Last Use) by way of a
RowHash match scan, which is joined to Spool 3 (Last Use).
Spool
2 and Spool 3 are joined using a
merge join, with a join condition
of
("(Spool_3.employee_number = Spool_2.sales_employee_number)
AND
(Spool_2.sales_employee_number =
Spool_3.employee_number)"). The
result goes into Spool 1, which is built locally on the AMPs.
The
size of Spool 1 is estimated with no
confidence to be 8 to 640
rows. The estimated time for this step is 0.20 seconds.
7) Finally,
we send out an END TRANSACTION step to all AMPs involved
in processing the
request.
-> The contents of Spool 1 are sent back to the user
as the result of