mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Load local timeline a lot faster by using leftJoin instead of innerJoin, wow
This commit is contained in:
parent
9492b7654f
commit
b39902d322
1 changed files with 2 additions and 1 deletions
|
|
@ -156,7 +156,8 @@ function getFilterQuery(filter: DittoFilter): EventQuery {
|
||||||
|
|
||||||
if (typeof filter.local === 'boolean') {
|
if (typeof filter.local === 'boolean') {
|
||||||
query = filter.local
|
query = filter.local
|
||||||
? query.innerJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
? query.leftJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
||||||
|
.where('users.d_tag', 'is not', null)
|
||||||
: query.leftJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
: query.leftJoin(usersQuery, (join) => join.onRef('users.d_tag', '=', 'events.pubkey'))
|
||||||
.where('users.d_tag', 'is', null);
|
.where('users.d_tag', 'is', null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue