Open fredericbarthelet opened 3 years ago
I was wondering if duplicating data across multiple attribute when there is an overlap in indexes is not a better strategy.
I agree on this -- I generally don't like to re-use attributes and would prefer to simply duplicate the data.
Maybe key configurability isn't a big deal after all. The current setup should solve for all use cases. Just beware you might get some folks who have strong preferences on key names 😅
Feels like I'm necroing this post but has anyone considered non-text GSI's? I have a use case where the SK on GSI-1 would benefit from being numeric, that way I can use update expressions to more efficiently add/subtract the property (I want to order and filter on these numbers).
Example:
PK | SK | GSI-1-PK | GSI-1-SK |
---|---|---|---|
a |
b |
z |
1.5 |
a |
c |
z |
2.2 |
b |
d |
z |
2.9 |
d |
e |
z |
1 |
I can then say GSI-1-PK = "z" AND GSI-1-SK BETWEEN 2 AND 3
which would get me row 2 & 3 respectively.
This issue follows initial implementation of
database/dynamodb-single-table
construct.Originally posted by @alexdebrie in https://github.com/getlift/lift/issues/69#issuecomment-875160059
Originally posted by @fredericbarthelet in https://github.com/getlift/lift/issues/69#issuecomment-878911455