Académique Documents
Professionnel Documents
Culture Documents
1)
2. When SQL covers the view then Teradata accesses the table to return the answer. 3. This is beneficial because the join index can be used even for SQL that does not reference the view. 4. This makes Teradatas implementation much more powerful then material views by other vendors. Look at the attached EXPLAIN output. (next slide) 5. The first SQL references the view used to define the join index. The second SQL is similar to the view definition but not actually the same. However, Teradata still exploits the AJI. The view definition is shown at the end of the file(slide). 6. An AJI work as follows. : When the AJI is created the view is materialized and saved in a table. When the rows of dependent tables are changed the rows of the AJI table need to be recalculated and stored for future query references. If the AJI is based on a complex view this can add significant overhead to INSERT and UPDATE operations on the dependent tables.
7)
Join Indexes are great for dimensional tables like the calendar and the geography hierarchy.
8).
With many updates, you might find it quicker to drop the AJI, update the tables, then recreate the AJI.
Text Document
Defined by you & Maintained by the system Immediately available to the Optimizer If a covering index, considered by the Optimizer for a merge join Reported by the HELP INDEX and SHOW TABLE statements
Collecting Statistics
Statistics should be collected on the primary index and secondary indexes of the Join Index to provide the Optimizer with baseline statistics.
Reporting Frequency
Multiple times a day, following data loads
Data Maintenance
Loads of POS throughout the day. Inventory loaded once a day. Full history of data is kept.