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

Multistatement query is not executing #28

Closed
AKGP opened this issue Apr 9, 2019 · 2 comments
Closed

Multistatement query is not executing #28

AKGP opened this issue Apr 9, 2019 · 2 comments

Comments

@AKGP
Copy link

AKGP commented Apr 9, 2019

I had an issue with running the multi statement query. Please provide a solution for this.

@southwolf
Copy link

Search Google. Clickhouse HTTP mode does not support multi statement.

https://groups.google.com/forum/#!topic/clickhouse/Bd-WWGhahO8
ClickHouse/clickhouse-java#51

@nezed
Copy link
Collaborator

nezed commented May 26, 2019

Thats right, since node-clickhouse uses HTTP interface, multi statement queries aren't supported.
Pay attention! Clickhouse is OLAP oriented DBMS and designed for queries with large data aggregation.

In case if you're still need to run few queries at the time, you may try following:

SELECT
  (SELECT 1) AS a,
  (SELECT 2) AS b

or

const [a, b] = await Promise.all([
  ch.querying('SELECT 1'),
  ch.querying('SELECT 2'),
])

.querying isn't recommended for large datasets!

@nezed nezed closed this as completed May 26, 2019
crystaldust added a commit to crystaldust/dashboard that referenced this issue May 11, 2022
This will make ck server execute multiple SQLs in a single http request
and cause error.
Refs:
- ClickHouse/clickhouse-java#51
- apla/node-clickhouse#28
- https://blog.csdn.net/xiaomin13234038121/article/details/124367641
crystaldust added a commit to crystaldust/dashboard that referenced this issue Jun 7, 2023
This will make ck server execute multiple SQLs in a single http request
and cause error.
Refs:
- ClickHouse/clickhouse-java#51
- apla/node-clickhouse#28
- https://blog.csdn.net/xiaomin13234038121/article/details/124367641
crystaldust added a commit to oss-know/dashboard that referenced this issue Jun 7, 2023
This will make ck server execute multiple SQLs in a single http request
and cause error.
Refs:
- ClickHouse/clickhouse-java#51
- apla/node-clickhouse#28
- https://blog.csdn.net/xiaomin13234038121/article/details/124367641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants