Introduction to Teradata Sparse Maps
The Teradata hashing architecture and how AMPs are used to split tables for maximum parallelism evenly have been unchanged since the beginning. What is new is the ability to create your hash maps. Hash maps, as we usually know them, are also called contiguous maps. If you are not familiar with the details of how Teradata distributes the rows of tables, I recommend you read this article first and then come back:
Part of the Teradata Internals and Operations guide.
Relatively new is the concept of Teradata sparse maps. They are used when we do not want to distribute a table over all AMPs. Unlike contiguous maps, sparse maps can be created by us almost arbitrarily. The goal of sparse maps is to keep tables on one or a few AMPs:

Sparse maps exist within a contiguous map. Teradata comes with two predefined sparse maps:
- Single AMP Sparse Map
- Sparse map with one AMP per Node
When should we use sparse maps?
Teradata sparse maps are used with small tables to prevent all-AMP access. Besides the better efficiency, this can also avoid waiting on a skewed system because of the all-AMP step, although Teradata should read-only rows of one or a few AMPs because all-AMP access also means that we have to wait for the slowest AMP. Sparse maps allow the optimizer to perform single-AMP operations with advantages such as fewer IOs, less vulnerability for congestion, etc.
Get the complete Teradata tuning book, free
Teradata Query Performance Tuning: The DWHPro Guide
By Roland Wenzlofsky & Artemios Vogiatzis
206 pages on statistics and demographics, access paths and indexes, query execution plans, and joins. Get the full PDF and practical Teradata updates from DWHPro.
Confirm your email to receive your download link. Privacy policy. Unsubscribe in any newsletter.
About the free bookWe can therefore expect more stable response times. As you may have noticed, sparse maps are especially suitable for tactical workloads due to the above-mentioned properties. Single-AMP sparse maps can support efficient access; workload-management classification rules, not the map itself, assign tactical priority. If you are interested in tactical workload tuning, I can recommend this article:
Teradata sparse maps are ideal for small tables. Especially if they have fewer rows than the system has AMPs. Using sparse maps for tiny tables also minimizes the risk of skewed dynamic AMP samples. In general, the small tables we query frequently are good candidates.
How are tables distributed inside the sparse map?
A single-AMP sparse map places each table on an AMP selected for that table. Different tables can share an AMP; distribution is not a guarantee of distinct placement. The diagram illustrates one possible arrangement.

Tables in the same single-AMP sparse map may or may not be colocated. Use a shared colocation name when deliberate placement on the same AMP is required, and inspect the resulting plan. Compatible PI joins on contiguous maps are a separate design choice.
As we have seen, sparse maps are an essential tool to improve the performance of small tables. Predominantly tactical workloads can benefit considerably from using sparse maps. Teradata provides automated capabilities in Viewpoint to find small tables and switch them to a sparse map. Treat 128 KiB as a historical heuristic, not a universal eligibility limit. Assess row size, access patterns, maps and contention on the target system.
Can I use Teradata Sparse Maps for big tables?
There are some possibilities for using sparse maps also for large tables. In the following article, you will learn how this is possible, but we will also show you alternatives to sparse maps (e.g., if you are on an older Teradata system where this feature is not yet available):
Finally, I would like to refer you here to an article about tactical workload because that is where sparse maps are predominantly needed:
Need help with query performance or platform costs?
Diagnose plans, skew, spool pressure and expensive workloads. Agree a baseline and acceptance criteria before making changes.
Get the complete Teradata tuning book, free
Teradata Query Performance Tuning: The DWHPro Guide
By Roland Wenzlofsky & Artemios Vogiatzis
206 pages on statistics and demographics, access paths and indexes, query execution plans, and joins. Get the full PDF and practical Teradata updates from DWHPro.
Confirm your email to receive your download link. Privacy policy. Unsubscribe in any newsletter.
About the free book