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

Avoiding hybrid query if count targets an aggregable field

    XMLWordPrintable

Details

    Description

      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

      Attachments

        Activity

          People

            fercoli@redhat.com Fabio Massimo Ercoli
            fercoli@redhat.com Fabio Massimo Ercoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: