I currently experience some bad query performance, with a large dataset of documents that have publication keys like draft, staging etc, which are subdocuments.
Our goal is to count the documents with a publication state missing, like: SELECT count(*) FROM data WHERE draft IS NOT MISSING AND domain='www'
We tried multiple things like creating an index over data(draft,domain) but it takes a huge part of our disk size.
We also tried an index like data(IFMISSING(draft,null),domain) but the query is to long as well.