I'm using cqpserver with perl CQI interface for the queries from web. Query results are pretty big (a few million matches), but I use paging, so about 100 matches need to be kwic'ed to the result page at a time.
The problem is, I need to know the exact distinct size of some textual attributes of the query result (e.g., the number of documents found). And retrieving a full subcorpus dump, then attribute ids for it to get distinct count at the Perl script side needs a huge amount of data to be send via socket and is deadly slow. In fact, row count of 'group <Query> match <attribute>' is the value I need.
I wonder if CQi allows this kind of query executed fully at the cqpserver's side out of the box?
CQI_CQP_FDIST_1 seems to be the command you're looking for.
CQi has fallen back behind CWB development over the last years. It would be interesting to know if there's a sufficient user base to merit updates to CQi, or whether a different interface (e.g. REST) would be preferred.