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
4 replies
Subscribers
4 subscribers
Views
1971 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
190101 - no subject - How to efficiently display data from mul
mjmallet
over 8 years ago
How to efficiently display data from multiple tables in a report?
I have to create a report that will be retrieving all rows from 4-5 different tables. The client wants to have the ability to extract that report into excel.
Is it best to create a view on the database that would consolidate all tables and then create a data type/data store to get that information to display in my grid?
I want to limit the number of queries to the database. If I fetch the data from each tables in SAIL and store it to a local variable, and then query against those local variable.
Which options would be less effort? And what would be the best practice in this scenario?
OriginalPostID-190101
Discussion posts and replies are publicly visible
0
narasimhaadityac
A Score Level 2
over 8 years ago
Hi mjmallet, it depends on the total data volume you are looking at and the relationship between those tables. If your requirement has any dependency on selection of tables.. then it would be good to go for individual if not then a view on top of the query would be a better solution with the queryEntity.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@mjmallet Hi, construction of a database view is the ideal way to accomplish the use case. Not only the construction, the view should also execute very quickly, that is, it should be optimised to a maximum extent(for instance, making use of indices is one of the ways). Few practitioners here could assist you in case if you need any assistance in optimising the view.
An other way to perform a join is, you can query all the 5 tables individually and perform a join on the resultant datasets by making use of 'CDT Manipulation' plugin. But this way is complex.
When it comes to Appian, it's better to choose the way we query, depending on the size of dataset. If the size of the dataset is relatively small, then you can query the entire data and store it in a local variable. Else it would be ideal to query the data in batches, and that too it would be good to perform a query on need basis(For instance, in case of paging grid, data can be queried when the user paginates.)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashish.deshmukh
A Score Level 1
over 8 years ago
As per you requirement, you want to combine the data from 4-5 tables. The approach for this can be creation of a view or by manipulating the results of multiple expressions as stated by sikhivahans. But this absolutely depends on the amount of data on which you want to operate. As in your case, there are 4-5 tables involved, I would suggest to create a view which will avoid the extra overhead from Appian side. Also if there are any search filters you are adding in this report, its simple to have a query with filters(In case of view) rather than filtering in all different rules(if you are handling in SAIL).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mjmallet
over 8 years ago
Thanks for your input. I have created a view in my DB, it gets all the information needed for the report. :)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel