Use indexed column path_hash to find the parent

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-08-09 10:56:16 +02:00
parent de911f6e5c
commit 66b61eb67d
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

View File

@ -92,11 +92,11 @@ class RepairInvalidPaths implements IRepairStep {
$this->getIdQuery = $builder->select('fileid') $this->getIdQuery = $builder->select('fileid')
->from('filecache') ->from('filecache')
->where($builder->expr()->eq('storage', $builder->createParameter('storage'))) ->where($builder->expr()->eq('storage', $builder->createParameter('storage')))
->andWhere($builder->expr()->eq('path', $builder->createParameter('path'))); ->andWhere($builder->expr()->eq('path_hash', $builder->createParameter('path_hash')));
} }
$this->getIdQuery->setParameter('storage', $storage, IQueryBuilder::PARAM_INT); $this->getIdQuery->setParameter('storage', $storage, IQueryBuilder::PARAM_INT);
$this->getIdQuery->setParameter('path', $path); $this->getIdQuery->setParameter('path_hash', md5($path));
return $this->getIdQuery->execute()->fetchColumn(); return $this->getIdQuery->execute()->fetchColumn();
} }