Hi, There is a table having 2lakh + records, by using this table I want to

Hi,
There is a table having 2lakh + records, by using this table I want to implement search functionality. There are about 10 text fields, based up on the inputs I want to generate the grid. Can any one help me how to implement this search functionality.

Thanks!

OriginalPostID-164978

OriginalPostID-164978

  Discussion posts and replies are publicly visible

  • This SAIL recipe may help you implement the search functionality (called "filtering" in the documentation): forum.appian.com/.../SAIL_Recipes.html. You would want to adapt it to filter using a text box instead of a dropdown.
    If you'd like to search/filter on multiple fields, then this SAIL recipe should be helpful: forum.appian.com/.../SAIL_Recipes.html
  • As suggested by lakshmim, you can implement it using Appian default functions and you can use Appian recipes for reference. Along with that you can have a look at the Appian suggested best practices to handle large amount of data, below link explains it in detailed manner
    forum.appian.com/.../Database_Performance_Best_Practices.html

    Further you can take a look at the below documentation which explains various ways to fetch data from DB and the pros/cons of each.
    forum.appian.com/.../Querying_Data_From_an_RDBMS.html

    Hope this is helpful.
  • @anilkumark As said above by @lakshmim, the recipes should give a quick start to implement the functionality.

    Here goes few suggestions from performance perspective in addition to those provided by @ashishd:

    1. Try to opt for a!queryEntity and make the best use of it(For instance, retrieve only those columns that are needed in SAIL grid component). Documentation at https://forum.appian.com/suite/help/7.10/Querying_Data_From_an_RDBMS.html should be a good start for you.
    2. Make sure that the batching is effectively implemented. For instance, you may have 200000+ records in database but always get a minimal set of records per page, let's say 10 records per page or 20 records per page or 5 records per page. Simply speaking, instead of querying all the records in a single shot(ex: rule!getAllRecords()), query in batches(ex: rule!getAllRecords(topaginginfo(1,10)) or rule!getAllRecords(topaginginfo(51,10)) etc).
    3. Make sure that the query is in a right place. So if you place the query in with(), this will be evaluated each and every time when an interaction is made with a component (for instance, the data will be queried even when you interact with a filter) in the SAIL interface. Make sure that the query, todataubset() are performed only when you interact with the grid. (i.e. perform operations in the 'saveInto' attribute of grid component.)
    Ex:
    load(
    \tlocal!pagingInfo:a!pagingInfo(),
    \tlocal!datasubset:rule!getAllRecords(local!pagingInfo),
    \twith(
    \ ta!gridField(
    \ tvalue:local!pagingInfo,
    \ tsaveInto:{
    \ tlocal!pagingInfo,
    \ ta!save(local!datasubset,rule!getAllRecords(local!pagingInfo))
    \ t}
    \ t)
    \t)
    )
    4. Don't make a query as and when you start interacting with the SAIL components that acts as the filters. If possible, try to opt for a button. Let's call it as 'Search' for a while. Perform the query and the todataubset() upon clicking this button. (i.e. perform operations in the 'saveInto' attribute of button component.)

    To the best of my knowledge, I don't think there will be an issue from the performance perspective, if the above points are kept in mind during the design.