which scenario Query Record gives less performance

As per the Documentation Query Record gives less performance than query Entity or Query Rule,   in case of query Entity we are getting the Data from DB but in case of Query Record the parameter is Record Type so in such case before using Query Record either Entity or Process backed Record is in place . so it means data also available  then In which scenario Query Record gives less performance?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    Hi i agree, Query Record gives less performance compared to Query Entity or Query Rule, because

    While working with Query Rule/Query Entity we directly hit the db along with the required columns as selection (not for Query Rule), paging & filtering options, and the response gets returned to us/End User.

    But while working with Query Record, first of all, the Record need to fetch the data(from DB/Process/External Service) along with their defined default filters, sorting and paging, and once the record gets the data, we need call query over this Record Type as part of queryrecord() function along with paging.
    So here the Query operation gets performed for twice, which can impact the performance relatively compared to Query Entity or Query Rule.


    Also while using Query Entity, if the call happens with the exact same parameters for more than once, the first call's result will be reused for further requests, because Appian uses JPA for DB related operations, and JPA uses Cache.

    Hope this will help you, to identify the difference with respect to performance between Query Record and Query Entity/Query Rule.
Reply
  • 0
    Certified Lead Developer
    Hi i agree, Query Record gives less performance compared to Query Entity or Query Rule, because

    While working with Query Rule/Query Entity we directly hit the db along with the required columns as selection (not for Query Rule), paging & filtering options, and the response gets returned to us/End User.

    But while working with Query Record, first of all, the Record need to fetch the data(from DB/Process/External Service) along with their defined default filters, sorting and paging, and once the record gets the data, we need call query over this Record Type as part of queryrecord() function along with paging.
    So here the Query operation gets performed for twice, which can impact the performance relatively compared to Query Entity or Query Rule.


    Also while using Query Entity, if the call happens with the exact same parameters for more than once, the first call's result will be reused for further requests, because Appian uses JPA for DB related operations, and JPA uses Cache.

    Hope this will help you, to identify the difference with respect to performance between Query Record and Query Entity/Query Rule.
Children
No Data