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

SQL in getCatalogs method cause JDBC pause 30 seconds #1921

Closed
be-happy4 opened this issue Nov 8, 2024 · 1 comment
Closed

SQL in getCatalogs method cause JDBC pause 30 seconds #1921

be-happy4 opened this issue Nov 8, 2024 · 1 comment
Labels
bug jdbc-v2 jdbc-v2 issues
Milestone

Comments

@be-happy4
Copy link

Describe the bug

When I use DBeaver to connect to ClickHouse, I found that it is very slow to open the connection.
After some debugging, I found that a SQL in the getCatalogs method never gets a response and hangs for 30 seconds until it times out.

select concat('jdbc(''', name, ''')') as TABLE_CAT from jdbc('', 'SHOW DATASOURCES') order by name

This SQL wastes half a minute of my time once I use DBeaver to open a ClickHouse connection. Hope you can fix it.
Best wishes.
image
image

Steps to reproduce

image

Expected behavior

Don't waste time in getCatalogs method

Code example

Error log

Configuration

Environment

  • Client version: clickhouse-jdbc:0.6.1
  • Language version: java23
  • OS: macOS/Windows

ClickHouse server

  • ClickHouse Server version: 24.9.2.42
    image
@be-happy4 be-happy4 added the bug label Nov 8, 2024
@chernser chernser added the jdbc-v2 jdbc-v2 issues label Jan 9, 2025
@chernser
Copy link
Contributor

Fixed in new JDBC v2.

@chernser chernser added this to the 0.8.0 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug jdbc-v2 jdbc-v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants