Skip to content

User-defined secondary indexes #129

@tkadlec

Description

@tkadlec

I would love to be able to pass through a secondary index to both speed things up and filter out stuff I don't need.

Here's my specific use-case...

I have an "orders" table, an "items" table, and an accounts table.

Each item can be (but doesn't have to be) associated with an order. Each order and item are each associated with an account.

Right now, if I want to pull a page that shows all items for a user's account, and provide information about all orders as well, I think (unless I'm doing it wrong), I have to query:

  • to get all orders, then filter out any not related to the current account
  • to get all items, then filter out any not related to the current set of orders (account too I guess if I want to be super careful)

I'm sure there could be a structural change I could consider, but already, I feel like being able to limit the orders and items by the account by providing that as a secondary index would speed things up quite a bit (he says as if he's got any significant experience optimizing DynamoDB).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions