pdb.agg allows for
these results to be returned in a single “faceted” query. This can significantly improve read throughput, since issuing a single
query uses less CPU and disk I/O.
For example, this query returns the top 3 search results alongside the total number of results found.
Expected Response
Faceted queries require that
pdb.agg be used as a window function:
pdb.agg() OVER ().