Query for static data on Database

Certified Senior Developer

Hi all,

I wanted to know about the best option for a query in static data on database.

which would be the most optimal performance: "queryRecordType" or "queryEntity"?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Thanks for the tag! In general my response on the linked post still stands. Keep in mind that there are a TON of factors that can influence query performance, so it can be hard to do 1:1 comparisons. Things that can influence the performance include things like:

    • Volume of data (rows and columns) in the source and in the query
    • VPN connections / overhead / latency to access the source
    • Complexity of query (filters, related data, custom fields, record-level security, etc)
    • Whether the data is aggregated or not
    • What the load is on the system at the time of the query

    Because of that, I can't give a blanket statement that every query will be faster with a!queryRecordType(). However, in general I think you will see better overall outcomes with a!queryRecordType() for a few reasons:

    1. Our query performance optimizations specifically focus on more complex queries, where you're joining data from multiple sources or performing complex filtering / aggregation. So like Mathieu said, you're more likely to see better performance with more complex queries.
    2. The data is cached, which eliminates overhead between Appian and the source in scenarios where there is latency to the original data source. Plus, it eliminates issues from querying from multiple types.
    3. And of course the other key benefit is that the design experience in Appian is easier than needing to do performance tuning on your source system. An accomplished Database Administrator could likely set up indexes or tune the database to have good performance, but with Appian Records you don't have to!

    For what it's worth, we have done performance testing internally across a number of real use cases like reporting dashboards that test queries against synced records and have found better performance in aggregate.

    Not only that, as part of our program we plan to continue to release optimizations for performance, so you'll only see the performance continue to get better!