[MCOL-5582] max_statement_time not working for CTEs Created: 2023-09-28  Updated: 2023-12-27

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 23.02.4
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Ananth Mahadevan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I am benchmarking several queries on Aria and Columnstore. Some of these queries take longer on the Columnstore. Hence, I wanted to abort long-running queries using the `max_statement_time` option. I use the Python SQLAlchemy and pymysql library to connect to the database.
When profiling my queries, I have no issues using `max_statement_time` along with Aria Tables. However, I have several issues when I attempt to profile the same queries on the Columnstore tables.
First, a long-running query is aborted and shows as killed in the PROCESSLIST. However, this query doesn't end and stays indefinitely on the server, requiring a restart. Second, I noticed that the `max_statement_time` fails specifically on queries where I have several CTEs, not queries that are simple SELECT statements.
This behaviour is odd as there is no issue for the Aria engine and the same CTE queries alogn with `max_statement_time`.



 Comments   
Comment by Roman [ 2023-10-19 ]

Hi.
Thx for the report but it is hard to find out the root cause w/o a reproduction case. It would be great if you share one.

Comment by Ananth Mahadevan [ 2023-12-27 ]

I will look into creating a reproducible case with minimal data and queries.

Generated at Thu Feb 08 02:58:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.