fix: Avoid too large index on postgres as indexing just the last_editor column is enough

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-11-06 17:30:31 +01:00
parent cc5e6c349a
commit c2fd39779f
3 changed files with 63 additions and 3 deletions

View File

@@ -306,8 +306,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description')
->from('deck_cards')
->where($qb->expr()->isNotNull('last_editor'))
->andWhere($qb->expr()->isNotNull('description_prev'));
->where($qb->expr()->isNotNull('last_editor'));
return $this->findEntities($qb);
}