Skip to content

Commit 9fb1551

Browse files
committed
ENH Disable sorting on queries where sort order doesn't matter
Sorting queries can be slow, especially on large datasets and especially if indexes aren't optimised. We should avoid sorting when the sort order doesn't matter.
1 parent 6bf5bde commit 9fb1551

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Tasks/MigrationTaskTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ private function checkForBrokenLinks(): void
388388
foreach ($checkForBrokenLinks as $class => $data) {
389389
$field = $data['field'];
390390
$emptyValue = $data['emptyValue'];
391-
$ids = DataObject::get($class)->filter([$field => $emptyValue])->column('ID');
391+
$ids = DataObject::get($class)->filter([$field => $emptyValue])->getIDList();
392392
$numBroken = count($ids);
393393
$this->output->writeln("Found $numBroken broken links for the '$class' class.");
394394
if ($numBroken > 0) {

0 commit comments

Comments
 (0)