Hello Team,
We replicated our production application database into test environment to recreate some issue and observed a new issue.
On record type it is timing out, we started checking record type and on Default Filters we have id selected and below expression is there to bring id's based on user role below expression is for admins . if we are passing 1,-1 it is taking more than 7 seconds .
if we are passing 1,25 still it is taking same time or sometimes more than that. it is entity backed record and data is coming from view.
Note data is same on PROD and TEST , on PROD it is taking 1 second for 1,-1 and 7 MS for 1,25. What can be the issue ?
tointeger(a!queryEntity( entity: cons!ABC_VIEW_DSE, query: a!query( selection: a!querySelection( columns: { a!queryColumn( field:"id" ) } ), pagingInfo:a!pagingInfo(1,-1) )).data.id)
Discussion posts and replies are publicly visible
As Appian is written in java so it has 2 objects, 1 controller, and 1 service class to map database object to the Appian CDT object.
Data Transformation Object
Data Acces Object
Which are mapped using a transformation service class. So basically it's a web API(with paginated) call which we are under presumption its a database call. Whenever there is a probability of a huge data set, I would recommend a stored procedure with pagination. I am sooner going to blog about this with the detailed performance of Appian database connections. I have already written one article on this aspect "https://www.linkedin.com/pulse/microservices-vs-appianbuild-microservice-praful-singhal/?trackingId=Ig3w6S0pSvi0arXGOMWgBw%3D%3D". I am now planning to deep dive into it with my next article coming on this weekend, hope my next article will help you understand the root cause and take you in the right step in direction of store procedures.