Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
2175 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
We're experiencing a slowdown when loading a lot of data from the DB to be u
nickh413445
over 9 years ago
We're experiencing a slowdown when loading a lot of data from the DB to be used in a form. What we're doing is loading up all of the data from the DB, applying a filter based on user input, and showing the results all on the same page. The user input is based off a mathematical function, so using the Appian query rules isn't an option.
The initial data load takes about 15 seconds, so when the user clicks a "Next" button to get to the page it hangs.
Has anyone else ran into this issue with a long load time, and how did it get resolved?
OriginalPostID-152339
OriginalPostID-152339
Discussion posts and replies are publicly visible
0
Jim Schweitzer
Certified Lead Developer
over 9 years ago
Are you using a!queryentity? To load the data? Try to get all your filter Params identified first then dynamically pull back only the data you need.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nickh413445
over 9 years ago
Can't use a!queryentity since we need to apply a function to the data in the column. Idk if you can see my previous post about that.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@nickh I might be wrong, but I thought that sharing some information would be worth because even we faced some inevitable scenarios like these. If you are performing operations post submission of the form, it would be worth trying a stored procedure or query database (with an efficient SQL), as these would retrieve data much quickly in case of complex operations. Else, if possible, try to opt for an approach where the query is made on need basis i.e. if you are surfacing the data in a paging grid, limit the records (say, 25 a page) and get only page full of data and query the rest upon pagination.
Few more things which might be worth taking a look at are:
1. Implement the indexing of columns wherever possible.
2. Retrieving only those columns that are required (limiting the number of columns in selection)
3. Creating a cdt (and mapping it to the existing table/ view) which consists of only useful columns that are frequently used in queries.
I think, the time consumed may not come down at times even when all the above are taken care of, so I would like to suggest to delegate the processing as much as possible to database by making use of the options present in the database such as functions, routines etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jaishankarj
over 9 years ago
We faced similar issue but not exactly the same. The steps which we followed are as follows:
1. Use execute stored procedure smart service
2. If possible use the view rather than fetchin whole data
3. Create index in the table from where data is being fetched
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nickh413445
over 9 years ago
So I ended up splitting up the SQL function into pieces we could use with a!queryEntity and a!queryLogicalExpression. We were using a mathematical function based on user inputs, but luckily I was able to find another version of the function that allowed me to split it up into distinct parts. Thanks for all your help!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel