Push down predicates and limit when querying system tables
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
For now, the implementation of `(e *memtableRetriever) retrieve` is problematic with a large number of tables. For example, when there are 300k tables, a full load of `information_schema.tables` takes more than 30GB(100 bytes per record).
Without the support for pushing down optimization, it is very easy to cause TiDB OOM even for a "limit 1" query against system tables.
Contributor guide
Assessment
This issue has not been assessed yet.