readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

Lateral Joins #1395

Open relsunkaev opened 4 weeks ago

relsunkaev commented 4 weeks ago

Is your feature request related to a problem? Please describe.

ReadySet currently does not support lateral joins, which limits the ability to use correlated subqueries in certain SQL queries. We use a popular JavaScript library, Drizzle ORM, which relies on lateral subqueries for many of its relational queries. As a result, a significant number of our queries are not cacheable in ReadySet.

Describe the solution you’d like

It would be helpful if ReadySet supported lateral joins, allowing for correlated subqueries and more complex query patterns to be executed efficiently and cached.

Describe alternatives you’ve considered

Refactoring queries to avoid lateral join by not using the relational syntax for the ORM that we use. This is cumbersome significantly reduces the library's ergonomics.

gvsg-rs commented 4 weeks ago

@relsunkaev - thank you for the submission. We expect to work on lateral joins this quarter. I'll update this ticket when we start work on it.