Skip to content

Commit

Permalink
Merge pull request #2117 from acelaya-forks/feature/superfluous-distinct
Browse files Browse the repository at this point in the history
Remove unneeded DISTINCT from list short URLs query
  • Loading branch information
acelaya authored May 6, 2024
2 parents 194a7b0 + cb3a690 commit 05ebfcc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function findList(ShortUrlsListFiltering $filtering): array

$qb = $this->createListQueryBuilder($filtering);
$qb->select(
'DISTINCT s AS shortUrl',
's AS shortUrl',
'(' . $buildVisitsSubQuery('v', excludingBots: false) . ') AS ' . OrderableField::VISITS->value,
'(' . $buildVisitsSubQuery('v2', excludingBots: true) . ') AS ' . OrderableField::NON_BOT_VISITS->value,
// This is added only to have a consistent order by title between database engines
Expand Down

0 comments on commit 05ebfcc

Please sign in to comment.