Skip to content

Suboptimal queries on Session/Connection initiation in version 4.17 #282

@Foxlik

Description

@Foxlik

While looking into performance issues in one of our clusters I've noticed that the v4.17 Java driver does uses some sub-optimal queries on connecting to the cluster:


CompletionStage<AdminResult> localQuery = query(channel, "SELECT * FROM system.local");

Both of these queries force full table scan as there's no key reference. I've tried appending WHERE key = 'local' to these queries and as a result the Session creation got about 90 % faster in the troubled cluster case. (YMMV)

This seems to be fixed in the 3.x version of the driver.

private static final String SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'";

Looks related to this issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions