From 56fb3e2712b953de63e87968279824a299151f4d Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 25 Nov 2022 14:20:44 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=A2=9E=E5=8A=A0=E8=A1=A8=E7=B4=A2?= =?UTF-8?q?=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V4__2.4.1_release.sql | 13 +++++++++++++ .../resources/db/migration/V3__2.4.1_release.sql | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql create mode 100644 performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql diff --git a/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql b/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql new file mode 100644 index 0000000000..a03b3430cf --- /dev/null +++ b/api-test/backend/src/main/resources/db/migration/V4__2.4.1_release.sql @@ -0,0 +1,13 @@ +-- +-- 增加一个索引 +SELECT IF(EXISTS(SELECT DISTINCT index_name + FROM information_schema.statistics + WHERE table_schema = DATABASE() + AND table_name = 'api_definition' + AND index_name LIKE 'api_definition_module_id_status_index'), + 'select 1', + 'ALTER TABLE api_definition ADD INDEX api_definition_module_id_status_index (module_id, status)') +INTO @a; +PREPARE stmt1 FROM @a; +EXECUTE stmt1; +DEALLOCATE PREPARE stmt1; \ No newline at end of file diff --git a/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql b/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql new file mode 100644 index 0000000000..6da879cca0 --- /dev/null +++ b/performance-test/backend/src/main/resources/db/migration/V3__2.4.1_release.sql @@ -0,0 +1,13 @@ +-- +-- 增加一个索引 +SELECT IF(EXISTS(SELECT DISTINCT index_name + FROM information_schema.statistics + WHERE table_schema = DATABASE() + AND table_name = 'load_test_report_detail' + AND index_name LIKE 'load_test_report_detail_report_id_part_index'), + 'select 1', + 'ALTER TABLE load_test_report_detail ADD INDEX load_test_report_detail_report_id_part_index (report_id, part)') +INTO @a; +PREPARE stmt1 FROM @a; +EXECUTE stmt1; +DEALLOCATE PREPARE stmt1; \ No newline at end of file