Skip to content

Commit

Permalink
The objectid is a string
Browse files Browse the repository at this point in the history
This allows the query to use the index. Else it has to resort on
scanning all the rows.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Jan 28, 2021
1 parent 2d22b56 commit 7e727a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/SystemTag/SystemTagObjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getTagIdsForObjects($objIds, string $objectType): array {
->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');
Expand Down

0 comments on commit 7e727a1

Please sign in to comment.