Skip to content

Commit aefde67

Browse files
committed
(improvement) metadata: select only needed columns from system_schema.columns
Replace SELECT * with an explicit column list for the system_schema.columns query in SchemaParserV3 (inherited by V4). Only the 7 columns actually consumed by the parser are fetched: keyspace_name, table_name, column_name, clustering_order, kind, position, type. This reduces network transfer and deserialization overhead during schema refresh.
1 parent fc87fba commit aefde67

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cassandra/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ class SchemaParserV3(SchemaParserV22):
24892489
"""
24902490
_SELECT_KEYSPACES = "SELECT * FROM system_schema.keyspaces"
24912491
_SELECT_TABLES = "SELECT * FROM system_schema.tables"
2492-
_SELECT_COLUMNS = "SELECT * FROM system_schema.columns"
2492+
_SELECT_COLUMNS = "SELECT keyspace_name, table_name, column_name, clustering_order, kind, position, type FROM system_schema.columns"
24932493
_SELECT_INDEXES = "SELECT * FROM system_schema.indexes"
24942494
_SELECT_TRIGGERS = "SELECT * FROM system_schema.triggers"
24952495
_SELECT_TYPES = "SELECT * FROM system_schema.types"

0 commit comments

Comments
 (0)