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 <roeland@famdouma.nl>
This commit is contained in:
parent
af54ab7af6
commit
6fa08f38b3
|
@ -78,7 +78,7 @@ class SystemTagObjectMapper implements ISystemTagObjectMapper {
|
||||||
->from(self::RELATION_TABLE)
|
->from(self::RELATION_TABLE)
|
||||||
->where($query->expr()->in('objectid', $query->createParameter('objectids')))
|
->where($query->expr()->in('objectid', $query->createParameter('objectids')))
|
||||||
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))
|
->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)
|
->setParameter('objecttype', $objectType)
|
||||||
->addOrderBy('objectid', 'ASC')
|
->addOrderBy('objectid', 'ASC')
|
||||||
->addOrderBy('systemtagid', 'ASC');
|
->addOrderBy('systemtagid', 'ASC');
|
||||||
|
|
Loading…
Reference in New Issue