Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13986

Avoiding hybrid query if count targets an aggregable field

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      It seems that a hybrid query is performed on `select count(field) ...` query, even if the target field is aggregable, projectable (new annotations) or stored (old annotations).
      This could lead a bad performance.

       

      Workaround

      If the aggregation function targets non-numeric values (e.g., string values), it is possible to perform one query individually (for each group) and get the count to compute the results. Here is an example of using it:

      https://github.com/fax4ever/infinispan-play/blob/59e5193e34bc0f4ea80152b195fe0404062d385b/aggregation-massive/src/test/java/fax/play/SmokeTest.java#L65

              fercoli@redhat.com Fabio Massimo Ercoli
              fercoli@redhat.com Fabio Massimo Ercoli
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: