From 8b35f61e59a7fd502c3c2b7ba14e7c5a279e8f2a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 5 Jul 2016 22:40:14 +0200 Subject: [PATCH] Optimize insert in table RESOURCE_INDEX by specifying the JDBC types of columns in MyBatis mapper. --- .../sonar/db/component/ResourceIndexMapper.xml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml b/sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml index bfd4a315573..94bb6588d73 100644 --- a/sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml +++ b/sonar-db/src/main/resources/org/sonar/db/component/ResourceIndexMapper.xml @@ -61,9 +61,21 @@ - insert into resource_index (kee, position, name_size, component_uuid, root_component_uuid, qualifier) - values (#{key}, #{position}, #{nameSize}, - #{componentUuid}, #{rootComponentUuid}, #{qualifier}) + insert into resource_index ( + kee, + position, + name_size, + component_uuid, + root_component_uuid, + qualifier) + values ( + #{key, jdbcType=VARCHAR}, + #{position, jdbcType=INTEGER}, + #{nameSize, jdbcType=INTEGER}, + #{componentUuid, jdbcType=VARCHAR}, + #{rootComponentUuid, jdbcType=VARCHAR}, + #{qualifier, jdbcType=VARCHAR} + ) -- 2.39.5