Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Foxlik opened this issue Apr 12, 2024 · 1 comment
Open

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

Foxlik opened this issue Apr 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Foxlik
Copy link

Foxlik commented Apr 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants