The following are the steps to create a join index to improve performance:
- Connect to the Teradata database using SQLA or Studio.
- Check the explain plan for the following query:
/*SELECT on base table*/EXPLAIN SELECT id,dept,emp_Fname,emp_Lname,status from td_cookbook.EMP_SALwhere id=4;1) First, we do a single-AMP RETRIEVE step from td_cookbook.EMP_SAL by way of the primary index "td_cookbook.EMP_SAL.id = 4" with no residual conditions into Spool 1 (one-amp), which is built locally on that AMP. The size of Spool 1 is estimated with low confidence to be 2 rows (118 bytes). The estimated time for this step is 0.02 seconds. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated ...