Advice on how to measure query data size while using DB2?

Hi,

In Appian we have 1 MB limit for any DB query result set so how to determine the size of Query Entity result set?
We are using DB2 database and not able to find any way to measure the resultant data size.

Thanks,
Jayashri

OriginalPostID-227724

OriginalPostID-227724

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    I'm not familiar with DB2 tools, but in sql you can access client statistics to see this. May want to google what exists in db2.

    Also, it may be less about what the full query is and instead make sure that you are bringing back consumable amounts of data in your paging size (instead of bringing all rows back), only the fields the user needs or wants to see, etc. This will help make sure you don't exceed the limit.

    Hope that helps!
  • This link might help you stackoverflow.com/.../sql-finding-the-size-of-query-result
    At-least you will get approximate size. If you create a temp table for your appian query and execute command given in the link. Then you will get data size but you will need to consider size of indices if any.
  • You will want to optimize the table/view so that the performance is maximized. In addition, remove all columns that are not needed from the table/view/CDT. Using a paging size of 5 or 10 will also reduce the amount of memory retrieved by the query. If none of these options work, then you will have to redesign the Appian application so that the amount of data being retrieved at any one time is smaller. One example I can give is that if you need to display a lot of columns in a grid, design a grid that only shows 7 columns at a time, with links/buttons on the left and right to scroll between active columns of the grid, retrieving only the columns of data for the currently shown columns using queryEntity selection property.