Indexes
Local Seconday Index (LSI)
This provides an
Alternative Sort Keyfor your table, but with same partition key of the base table.This sort key can be a scalar attribute of type
String,BinaryorNumberof base table.Can have upto 5 LSI per table.
Must be defined at table creation time.
It may contain some or all attribute from base table.
LSIuses capacity units of base table.
Global Seconday Index (GSI)
Alternative Primary key from the base table.
This index enables to speed up the queries based on non-key attributes.
Index key consists of scalar attributes from base table of type
Number,StringorBinary.Attribute projections can be some or all attributes of the base table.
Must provision
RCUandWCUfor the index (kind of like a new table).They can be created/modified after table creation.
Throttling
GSI Index
If writes are throttled on GSI, then the main table will be throttled even if there is enough capacity on main table.
LSI Index
No need for special consideration of throttling.
They use
WCUandRCUof main table.
Last updated