![]() I want it to behave exactly like but I'm using the Query API instead of the Select API.Īnother possibility: A commenter in stackoverflow suggested this is an issue with the MySQL dialect not the query API. ![]() It should render as Select /*+ MAX_EXECUTION_TIME(30000) */ a, b, c from MyTable The hint is just rendered at the end of the query, apparently! # Select a, b, c from MyTable MAX_EXECUTION_TIME(30000) These hints apply to queries that use the hash join feature in Aurora MySQL version 2, especially queries that use parallel query optimization. The following hints are available in Aurora MySQL version 2. My code is roughly: from flask_sqlalchemy import SQLAlchemyīase_query = (MyTable) # This works when I execute it.īase_query_with_hint = base_query.with_hint(MyTable, "MAX_EXECUTION_TIME(30000)")īase_query_with_hint.execute() # THIS DOES NOT WORK. Table hints are used to override the default behavior of the query optimizer during the data manipulation language (DML) statement. For more information about these hints, see Optimizer Hints in the MySQL Reference Manual. EXPLAIN SELECT /+ JOINORDER (t4, t2) / f1, f2 FROM t1 JOIN t2 USING (id) JOIN t3 USING (id) JOIN t4 USING (id) JOINSUFFIX Specifies the tables to put last in the join order. The following examples show you how to use this hint. To determine the best possible plan, the query. I'm trying to use the query API to create a MySQL query with the the MAX_EXECUTION_TIME(30000) hint. This hint is available in Aurora MySQL version 2.08 and higher. In MySQL, when you submit an SQL query, the query optimizer will try to make an optimal query execution plan.
0 Comments
Leave a Reply. |