I am trying to operate a SQL query using excel VBA
select count(distinct column_name) from db_name.table_name
but, I end up with the following error:
Run-time error '-2147467259 (80004005)' [MySQL] [ODBC 8.00(w) Driver][mysqld-5. 7.21] Query execution was interrupted, maximum statement execution time exceeded
There are 4 million records in the table with 230 columns. I have tried increasing "max_execution_time" value but it does not help. The error comes up in 30 seconds after execution.
How can I get past this timeout issue?
- MYSQL version 5.7.21 (WAMP 32 bit)
- Excel - Office 365
max_execution_timeto? And did you restart the MySQL server after changing the global variable? Please show the actual VBA code block including connection and recordset call (not line snippet of SQL). You can set query time on the ODBC call.