pingcap / pingcap/tidb

Push down predicates and limit when querying system tables

Open
#32,868 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.