You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
With read queries, you can only pass one SELECT statement at a time. This leads to UX issues at the application level as well as DX. For example, if a webpage has some visual that relies on multiple, unrelated read queries, they must independently send one query at a time. Thus, the page has to wait for multiple responses before rendering the UI.
Describe the solution you'd like
Parallelize table reads so that multiple SELECT statements can be passed to a single read query, returning a single object that wraps all of the table responses. As noted by @carsonfarmer, this is a Validator API enhancement that would then have a downstream impact on both the SDK and CLI, but it is something the D1 API supports.
Describe alternatives you've considered
Developers could maybe try to implement their own multithreading approach, but this adds complexity and detracts from the DX.
Additional context
The request is coming from a developer that has a production application ready to go from a write perspective (i.e., tables are minted), but their hold up is related to read queries, as described above.
brunocalza
changed the title
Allow for multiple, parallelized read queries within a single call
[GOT-51] Allow for multiple, parallelized read queries within a single call
Mar 23, 2023
Is your feature request related to a problem? Please describe.
With read queries, you can only pass one
SELECT
statement at a time. This leads to UX issues at the application level as well as DX. For example, if a webpage has some visual that relies on multiple, unrelated read queries, they must independently send one query at a time. Thus, the page has to wait for multiple responses before rendering the UI.Describe the solution you'd like
Parallelize table reads so that multiple
SELECT
statements can be passed to a single read query, returning a single object that wraps all of the table responses. As noted by @carsonfarmer, this is a Validator API enhancement that would then have a downstream impact on both the SDK and CLI, but it is something the D1 API supports.Describe alternatives you've considered
Developers could maybe try to implement their own multithreading approach, but this adds complexity and detracts from the DX.
Additional context
The request is coming from a developer that has a production application ready to go from a write perspective (i.e., tables are minted), but their hold up is related to read queries, as described above.
GOT-51
The text was updated successfully, but these errors were encountered: