jiaqizho commented on code in PR #900:
URL: https://github.com/apache/cloudberry/pull/900#discussion_r1948312622
##########
src/backend/optimizer/plan/planner.c:
##########
@@ -342,6 +343,47 @@ planner(Query *parse, const char *query_string, int
cursorOptions,
return result;
}
+/* Check if query too simple to use optimizer */
+bool enabled_for_optimizer(Query *parse)
+{
+ int num_relations = 0;
+ ListCell *l;
+
+ if (optimizer_relations_threshold == 0)
Review Comment:
can't we direct use the `enable_optimizer`? The number of relations in
current query might not be very versatile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]