There is a call center application that repetitively sends tactical queries to Vantage These queries use a few small tables that are joined on the primary index column.
The following maps are defined in the system:
* TD_GlobalMap
* TD_Map1
* TD_DataDictionaryMap
* TD_1AmpSparseMap_1Node
What can be done to optimize these queries?
- Assign these tables to TD_1AmpSparseMap_1Node using different colocation names for each table.
- Assign these tables to TD_1AmpSparseMap_1Node using the same colocation name for every table
- Assign these tables to TD_Map1 using the same colocation name for every table.
- Assign these tables to TD_Map1 using different colocation names for each table.
Answer(s): B
Explanation:
Example:
TD_1AmpSparseMap_1Node is a sparse map that assigns the data to a single AMP (or a few AMPs), and using the same colocation name ensures that the tables are collocated on the same AMP. This helps in efficient joining because no data redistribution is required between AMPs when tables are joined on the primary index.
Using different colocation names for each table (options A and D) would place the tables on different AMPs, leading to less efficient joins since data would need to be shuffled between AMPs. TD_Map1 is a predefined map in the system but does not specifically optimize small, frequently accessed tables in the same way that TD_1AmpSparseMap_1Node does, which is more suitable for these scenarios.
Thus, using the same colocation name within the TD_1AmpSparseMap_1Node ensures that the joins are AMP-local, optimizing the repetitive tactical queries.
Reveal Solution Next Question