data coming very late from DB and sometimes timing out

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

Parents
  • 0
    Certified Lead Developer

    Some thoughts that might be worth looking into
    1. Run explain plan on your view. Is it doing any full table scans that can be removed 
    2. Is the ID field a PK or a field that has an index
    3. Since it looks like you are trying to convert the resulting set to integer in Appian, can you change the view to have that column as an integer and remove the tointeger

Reply
  • 0
    Certified Lead Developer

    Some thoughts that might be worth looking into
    1. Run explain plan on your view. Is it doing any full table scans that can be removed 
    2. Is the ID field a PK or a field that has an index
    3. Since it looks like you are trying to convert the resulting set to integer in Appian, can you change the view to have that column as an integer and remove the tointeger

Children