citusdata / citusdata/pg_shard
Use LIMIT to restrict rows from shards
Open
discussion
feature
- Dominant language
- C
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Currently, `LIMIT` clauses are processed entirely on the head node. These should get pushed down where possible.
For example, with `SELECT * FROM members ORDER BY join_date LIMIT 25`, we ought to be able to push that `ORDER BY` and `LIMIT` down to each shard, return only 25 rows from each shard, then resort and limit them on the head.
Contributor guide
Assessment
This issue has not been assessed yet.