Skip to content

API, SHARED: Full table scan being done to couchDB unnesesarily #1815

Description

@MrDirkelz

Examine why the app or cms would be sending a query causing a full table scan

[Luminary] Warn 7/13/2026, 2:28:53 PM Expensive /query - {
identifier: 'sync',
identity: 'ffc9b45b-1035-4533-bf39-46d9610179af',
reason: 'docs_examined',
total_docs_examined: 2418,
total_keys_examined: 2418,
results_returned: 0,
execution_time_ms: 1067.975,
use_index: 'sync-content-index',
fingerprint: '{"selector":{"$and":[{"type":"·"},{"updatedTimeUtc":{"$gte":"·","$lte":"·"}},{"parentType":"·"},{"$or":[{"language":{"$in":["·"]}},{"$and":[{"$not":{"availableTranslations":{"$elemMatch":{"$eq":"·"}}}}]}]},{"publishDate":{"$gte":"·"}},{"$or":[{"expiryDate":{"$exists":"·"}},{"expiryDate":{"$gt":"·"}}]},{"status":"·"},{"language":{"$in":["·"]}},{"memberOf":{"$elemMatch":{"$in":["·"]}}}]},"sort":[{"updatedTimeUtc":"·"}],"use_index":"sync-content-index"}'
}

The effect that can be read from the client is a gte:0 paired with lte: 0:
{selector: {type: "redirect", updatedTimeUtc: {$lte: 0, $gte: 0}, memberOf: {$elemMatch: {,…}}},…}
cms
:
false
identifier
:
"sync"
limit
:
100
selector
:
{type: "redirect", updatedTimeUtc: {$lte: 0, $gte: 0}, memberOf: {$elemMatch: {,…}}}
memberOf
:
{$elemMatch: {,…}}
type
:
"redirect"
updatedTimeUtc
:
{$lte: 0, $gte: 0}
$gte
:
0
$lte
:
0
sort
:
[{updatedTimeUtc: "desc"}]
use_index
:
"sync-redirect-index"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions