WithMultiStatement - creates an extra process for all queries that doesn't resolve until all queries are resolved. Takes up extra space and blocks other requests. #1009
Labels
question
Issue is a usage/other question rather than a bug
Issue description
I am using gosnowflake v1.6.17
Running it dockerized with alpine:3.15.0
I have a file that has multiple sql statements
Ex:
Select * from x_table LIMIT 5;
Select * from y_table;
Select * from z_table LIMIT 5;
And I am using this code snippet to execute them
ctx := context.Background()
New context, _ := gosnowflake.WithMultiStatement(ctx, 0)
_, err := db.ExecContext(msContext, queryStr)
In the snowflake activity tab, I was expecting to see 3 queries running but I am seeing 4 for this example, one for each query and one for all of the queries.
Processes:
1- Select * from x_table LIMIT 5; - COMPLETED
2- Select * from y_table; - RUNNING
3-Select * from z_table LIMIT 5; -COMPLETED
4-Select * from x_table LIMIT 5; -RUNNING
Select * from y_table;
Select * from z_table LIMIT 5;
The issue for me is the following:
Since the second query is not finished, the 4th query also seems to be not finished. And since I have multiple files like this, the 4th query that seems to be running takes up unnecessary space and blocks my other snowflake requests.
Is there way to not run the 4th query?
The text was updated successfully, but these errors were encountered: