Skip to content

Oracle state store bulk querying improvements #4041

@atrauzzi

Description

@atrauzzi

Describe the feature

Problem

Currently the Oracle state store component will perform a single, unbounded retrieval of multiple keys using a(n) SQL IN condition.

For small numbers of keys, this is probably fine. When dealing with larger numbers of items however, this approach can present some challenges:

  • Can be rough on indexes
  • Difficult to optimize
  • (Might be difficult for execution plans?)

Suggested improvements

While our general advice might be to suggest that users perform chunking on their end, there may still be a case for configurable chunking dapr-side as well:

  • Allow a maximum page/chunk size to be configured
  • When total number of keys exceeds the configured page size, dapr internally chunks
    • So, if page size is 100 and you have 1000 keys, it will do 100 keys 10 times...
  • Perform chunking in series, not in parallel (this is important!)
  • While we're here, it would be a good idea to do this Oracle specific tuneup to the query syntax: WHERE id IN (SELECT COLUMN_VALUE FROM TABLE(:bind_array))

Release Note

RELEASE NOTE:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions