Skip to content

Internal reusable CQL statements should be prepared #417

@psarna

Description

@psarna

Our driver issues a bunch of internal CQL statements periodically, e.g. to fetch topology and schema information. These statements are currently not prepared, which forces the database to meticulously parse their CQL over and over, which is a waste of CPU.
The solution is to rewrite all internal statements so that they're prepared once, and then executed. We have a helper function used mainly for internal queries - query_all. Ideally, all call sites of that function should be translated to execute_all.

Example:

let mut peers_query = Query::new("select peer, data_center, rack, tokens from system.peers");

Ref: scylladb/scylladb#10225

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions