From 6fa08f38b3ff1457ae936387fcd13a079f5ef0f0 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 28 Jan 2021 22:09:55 +0100 Subject: [PATCH] The objectid is a string This allows the query to use the index. Else it has to resort on scanning all the rows. Signed-off-by: Roeland Jago Douma --- lib/private/SystemTag/SystemTagObjectMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php index 5403321e58..a4d4ce910c 100644 --- a/lib/private/SystemTag/SystemTagObjectMapper.php +++ b/lib/private/SystemTag/SystemTagObjectMapper.php @@ -78,7 +78,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper { ->from(self::RELATION_TABLE) ->where($query->expr()->in('objectid', $query->createParameter('objectids'))) ->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype'))) - ->setParameter('objectids', $objIds, IQueryBuilder::PARAM_INT_ARRAY) + ->setParameter('objectids', $objIds, IQueryBuilder::PARAM_STR_ARRAY) ->setParameter('objecttype', $objectType) ->addOrderBy('objectid', 'ASC') ->addOrderBy('systemtagid', 'ASC');