reele commented on code in PR #11677: URL: https://github.com/apache/dolphinscheduler/pull/11677#discussion_r965712336
########## dolphinscheduler-dao/src/main/resources/sql/upgrade/2.0.7_schema/postgresql/dolphinscheduler_ddl.sql: ########## @@ -0,0 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +drop index if exists task_instance_idx_code_pid_edtm; +create index task_instance_idx_code_pid_edtm on t_ds_task_instance (task_code, process_instance_id, end_time); Review Comment: it's a performance optimize if use this pr, on my platform, it have 5000+ dependent task to run, it generate 15000 records per day in t_ds_task_instance, in preview version, I added index (task_code, end_time)(2.0.6) and (process_instance_id, flag, start_time)(<=2.0.5), if don't create this index, a large number of full table scans will lead to huge resource consumption and the scheduler's database will be paralyzed. -- 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]
