Skip to main content
January 16, 2024
Solved

Aggregation Query

  • January 16, 2024
  • 8 replies
  • 0 views

Hi,

Wanted to understand on how Appian parses an Expression Rule that uses a!queryAggregation and a!queryAggregationColumn against a Table/View? Does it convert and send a query as-is with GROUP By to the database SQL engine or does it get the data and then do the grouping on-fly in its memory?

Thank you in advance for your response.

    Best answer by stefanhelzle0001

    Aggregations are translated into SQL statements and sent to the DB for execution.

    8 replies

    stefanhelzle0001
    Brainy
    January 16, 2024

    Aggregations are translated into SQL statements and sent to the DB for execution.

    harshitb6843
    January 16, 2024

    Aggregation and filtering happen on the Database level. 

    konduruc733182
    January 16, 2024

    Hello praveend0002,

    Your query aggregation is used as an SQL statement for execution.

    karumurua531442
    January 16, 2024

     Appian translates the expression into a corresponding SQL query and sends it to the database.

    When these aggregation functions are used, Appian generates SQL queries that include GROUP BY clauses, and these queries are sent to the database engine for execution. Appian does not bring all the data into its memory and then perform grouping on it.

    January 16, 2024

    All,

    Thank you for the quick responses. Very much helpful !!!

    karumurua531442
    January 16, 2024

    Hi [mention:04a17523548f4679938f7df2bc78e15a:e9ed411860ed4f2ba0265705b8793d05]  If our answers helped you please verify the answers. Thanks

    mikes0011
    Brainy
    January 16, 2024

    It's intentionally obfuscated through the Appian-based abstraction layer (the data store, at least for the older data types), particularly so that they can shift things around in the back-end on a progressive basis to tweak efficiency without breaking the way things work on the Designer front-end.  That's all a long way of saying, we don't "officially" have any way of directly knowing what the exact SQL is that eventually gets passed to the DB via the Appian query, but it's reasonably safe to assume that by now they've probably fine-tuned it to be reasonably close to the most efficient thing possible.

    jonesprakashs0001
    January 16, 2024

    Hi [mention:04a17523548f4679938f7df2bc78e15a:e9ed411860ed4f2ba0265705b8793d05] ,

    I have recently come across a video on YouTube similar to this. Sharing it here might help - CTTO