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
  • HI

    Do you query record when you want to add more filtering on the existing record type, especially when record is process backed record or a entity back record which has default filters and back ground work already done (this means data is already filtered via record and has specific data set to queried upon using queryrecord).

    Other than that if we need to query data form DB and it is much straight forward i would go for queryentity as it is much faster and agile.

    Even though you use queryrecord underneath data needs to be queried first for record then filter according to your queryrecord conditions hence it can be slow, there is caching mechanism for query record where if there is multiple request for the same record with same query with in same expression only, this will give some performance advantage as this will refer to the same dataset that retrieved in the first call.

    My personal preference is when ever you have the ability use queryentity. But sometime it is easier to use query record but that all depends on the requirement at hand.
Reply
  • HI

    Do you query record when you want to add more filtering on the existing record type, especially when record is process backed record or a entity back record which has default filters and back ground work already done (this means data is already filtered via record and has specific data set to queried upon using queryrecord).

    Other than that if we need to query data form DB and it is much straight forward i would go for queryentity as it is much faster and agile.

    Even though you use queryrecord underneath data needs to be queried first for record then filter according to your queryrecord conditions hence it can be slow, there is caching mechanism for query record where if there is multiple request for the same record with same query with in same expression only, this will give some performance advantage as this will refer to the same dataset that retrieved in the first call.

    My personal preference is when ever you have the ability use queryentity. But sometime it is easier to use query record but that all depends on the requirement at hand.
Children
No Data