This visual execution compares Local Secondary Index (LSI) and Global Secondary Index (GSI) in DynamoDB. The flow starts with a base table having a primary key composed of partition and sort keys. Adding an LSI keeps the same partition key but changes the sort key, allowing queries on the same partition key but different sort keys. Adding a GSI allows both partition and sort keys to differ, enabling queries on completely different keys. The execution table traces creation steps, key usage, and query capabilities. Variable tracking shows how partition keys, sort keys, query capabilities, and size limits change with each step. Key moments clarify common confusions about partition key restrictions in LSI, flexibility in GSI, and size limits. The quiz tests understanding of index creation steps, key usage, and query flexibility. The snapshot summarizes key differences: LSI shares partition key and size limit with the base table, while GSI allows different keys and scales independently.