forked from FoundKeyGang/FoundKey
use DISTINCT instead of GROUP BY
This should have better performance for large recordsets. Ref: FoundKeyGang/FoundKey#198 (comment)
This commit is contained in:
parent
421b42d07d
commit
0b8fa2665c
1 changed files with 2 additions and 2 deletions
|
@ -103,12 +103,12 @@ export default class DeliverManager {
|
||||||
// deliver to all of known network
|
// deliver to all of known network
|
||||||
const sharedInboxes = await Users.createQueryBuilder('users')
|
const sharedInboxes = await Users.createQueryBuilder('users')
|
||||||
.select('users.sharedInbox', 'sharedInbox')
|
.select('users.sharedInbox', 'sharedInbox')
|
||||||
|
// so we don't have to make our inboxes Set work as hard
|
||||||
|
.distinct(true)
|
||||||
// can't deliver to unknown shared inbox
|
// can't deliver to unknown shared inbox
|
||||||
.where('users.sharedInbox IS NOT NULL')
|
.where('users.sharedInbox IS NOT NULL')
|
||||||
// don't deliver to ourselves
|
// don't deliver to ourselves
|
||||||
.andWhere('users.host IS NOT NULL')
|
.andWhere('users.host IS NOT NULL')
|
||||||
// so we don't have to make our inboxes Set work as hard
|
|
||||||
.groupBy('users.sharedInbox')
|
|
||||||
.getRawMany();
|
.getRawMany();
|
||||||
|
|
||||||
for (const inbox of sharedInboxes) {
|
for (const inbox of sharedInboxes) {
|
||||||
|
|
Loading…
Reference in a new issue