<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/discussions/f/best-practices/38898/best-way-to-get-all-data-for-user-from-table-that-contains-8-million-rows</link><description>Hi, 
 
 What is the most efficient way to retrieve data from a large table (more than 4 million rows) in Appian? 
 When I use queryEntity to fetch data from this table, it takes a long time to execute, which negatively impacts Appian’s performance. How</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/153504?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2026 09:34:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2731e0d6-076f-4e14-abb7-10db1289a158</guid><dc:creator>razvanc</dc:creator><description>&lt;p&gt;Hi Mohammed,&lt;/p&gt;
&lt;p&gt;Accidentally stumbled across this and wondered how did you go about this matter and maybe share my view, from a fellow banking sector employee, even if is a little late. :D&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I saw helped with our business colleagues when these similar cases appear is to get a clear objective as Stefan mentioned, after that you can add specific filter mandatory for the user to fill so that your fetched data could be already filtered so that it would be easier for the users to go through and then add pagination and sorting in case is needed. If you underline the benefits of shot sets of data over the drawbacks of &amp;quot;we need all the data&amp;quot; you have a chance to minimize your datasubset.&lt;/p&gt;
&lt;p&gt;Regards!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147140?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 19:48:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c5b88aea-adfb-4e94-9ce8-570312082a26</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147138?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 18:17:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ea236d4-410a-41cc-8139-012c0201e627</guid><dc:creator>Stefan Helzle</dc:creator><description>[quote userid="254888" url="~/discussions/f/best-practices/38898/best-way-to-get-all-data-for-user-from-table-that-contains-8-million-rows/147136"]What is the best way to get data from the database to Appian.[/quote]
&lt;p&gt;a!queryEntity or a!queryRecordType&lt;/p&gt;
&lt;p&gt;And you are limited to 5k rows in data, and showing 5k elements on one screen will not be a great UX.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147136?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 18:05:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc0a133c-1a1f-4a69-9571-5321230d2c7b</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p&gt;Of course, the search won&amp;#39;t be through the eyes. There are several filters on the screen, such as ticket status, date, customer name and number, etc. However, the screen will display data through a record or query.&lt;/p&gt;
&lt;p&gt;What is the best way to get data from the database to Appian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147131?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 16:46:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1aefdbc1-0845-47c7-b8c8-5393b0db5b00</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Sure, but do you want to but 100k rows of data on a screen and then make the clerk search this with his pure eyes?&lt;/p&gt;
&lt;p&gt;A clever made search capability could be a so much better approach.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147127?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 15:47:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:70464107-1ced-4c0c-a00d-1a90e83fafdb</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p class="" data-start="148" data-end="244"&gt;You&amp;#39;re right &amp;mdash; it&amp;#39;s important to understand the purpose behind showing the full list of tickets.&lt;/p&gt;
&lt;p class="" data-start="246" data-end="559"&gt;I&amp;rsquo;m working in the &lt;strong data-start="265" data-end="283"&gt;banking sector&lt;/strong&gt;, where business users &amp;mdash; especially branch employees and support teams &amp;mdash; need access to &lt;strong data-start="371" data-end="397"&gt;all historical tickets&lt;/strong&gt; related to a customer. This isn&amp;rsquo;t just for reporting; it&amp;#39;s about being able to &lt;strong data-start="477" data-end="529"&gt;quickly search and confirm customer interactions&lt;/strong&gt;, even from a year or two ago.&lt;/p&gt;
&lt;p class="" data-start="561" data-end="725"&gt;For example, if a customer walks into a branch today and refers to a service request or issue they submitted one or two years ago, the employee needs to be able to:&lt;/p&gt;
&lt;ul data-start="727" data-end="920"&gt;
&lt;li class="" data-start="727" data-end="792"&gt;
&lt;p class="" data-start="729" data-end="792"&gt;&lt;strong data-start="729" data-end="790"&gt;Confirm the customer&amp;rsquo;s previous tickets or service orders&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class="" data-start="793" data-end="863"&gt;
&lt;p class="" data-start="795" data-end="863"&gt;&lt;strong data-start="795" data-end="861"&gt;Check the ticket history to understand what actions were taken&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class="" data-start="864" data-end="920"&gt;
&lt;p class="" data-start="866" data-end="920"&gt;&lt;strong data-start="866" data-end="920"&gt;Provide immediate assistance based on full context&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="" data-start="922" data-end="1081"&gt;Limiting the data to just recent or paginated results could &lt;strong data-start="982" data-end="1033"&gt;delay service or lead to incomplete information&lt;/strong&gt;, which affects customer satisfaction and trust.&lt;/p&gt;
&lt;p class="" data-start="1083" data-end="1278"&gt;So, the goal is to ensure that &lt;strong data-start="1113" data-end="1175"&gt;employees have access to the full ticket history on demand&lt;/strong&gt;, in a fast and reliable way &amp;mdash; not for processing, but for &lt;strong data-start="1234" data-end="1277"&gt;searching, confirming, and following up&lt;/strong&gt;.&lt;/p&gt;
&lt;p class="" data-start="1280" data-end="1350"&gt;I hope this gives better context to the need for full data visibility.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147119?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 14:50:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa6bd679-7722-4e73-ad03-fc7da8e410c8</guid><dc:creator>Stefan Helzle</dc:creator><description>[quote userid="254888" url="~/discussions/f/best-practices/38898/best-way-to-get-all-data-for-user-from-table-that-contains-8-million-rows/147116"]business users want to &lt;strong data-start="1067" data-end="1111"&gt;see and analyze the full list of tickets&lt;/strong&gt;[/quote]
&lt;p&gt;... to do what? I suggest to discuss that first, then build something that supports achieving these goals.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147118?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 14:22:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb7011e5-6136-4a16-8e65-64b75519304b</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p class="" data-start="193" data-end="262"&gt;Thanks for following up &amp;mdash; let me clarify&amp;nbsp;the use case in more detail:&lt;/p&gt;
&lt;p class="" data-start="264" data-end="292"&gt;I&amp;rsquo;m working with two tables:&lt;/p&gt;
&lt;ul data-start="294" data-end="385"&gt;
&lt;li class="" data-start="294" data-end="341"&gt;
&lt;p class="" data-start="296" data-end="341"&gt;&lt;strong data-start="296" data-end="313"&gt;Tickets table&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; around&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="323" data-end="339"&gt;700,000 rows&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class="" data-start="342" data-end="385"&gt;
&lt;p class="" data-start="344" data-end="385"&gt;&lt;strong data-start="344" data-end="359"&gt;Tasks table&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;ndash; over&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="367" data-end="385"&gt;8 million rows&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="" data-start="387" data-end="571"&gt;There&amp;rsquo;s a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="397" data-end="425"&gt;one-to-many relationship&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;between them: each ticket can have multiple tasks. A single employee might be assigned to the same ticket multiple times through different tasks.&lt;/p&gt;
&lt;h3 class="" data-start="573" data-end="599"&gt;What I&amp;#39;m trying to do:&lt;/h3&gt;
&lt;p class="" data-start="600" data-end="718"&gt;I need to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="610" data-end="634"&gt;retrieve all tickets&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;that a specific employee has been involved with, based on their task assignments.&lt;/p&gt;
&lt;p class="" data-start="720" data-end="944"&gt;So while an employee might not have 100,000 active tasks in the usual &amp;ldquo;to-do&amp;rdquo; sense,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="805" data-end="875"&gt;the join between these tables can result in very large result sets&lt;/strong&gt;, especially for employees who have worked on many tickets over time.&lt;/p&gt;
&lt;h3 class="" data-start="946" data-end="980"&gt;Why pagination is challenging:&lt;/h3&gt;
&lt;p class="" data-start="981" data-end="1295"&gt;Normally, I would definitely use pagination. But in this case, business users want to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="1067" data-end="1111"&gt;see and analyze the full list of tickets&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;for an employee &amp;mdash; it&amp;rsquo;s more of a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong data-start="1145" data-end="1167"&gt;reporting/auditing/&lt;span&gt;Follow-up-on-tickets&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;scenario than a task management one. They often export this data or perform cross-referencing, so partial views aren&amp;rsquo;t helpful.&lt;/p&gt;
&lt;h3 class="" data-start="1297" data-end="1333"&gt;Regarding&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-start="1311" data-end="1320"&gt;forEach&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code data-start="1325" data-end="1332"&gt;union&lt;/code&gt;:&lt;/h3&gt;
&lt;p class="" data-start="1334" data-end="1601"&gt;Totally fair point &amp;mdash; I know they&amp;rsquo;re not ideal for large datasets. I&amp;rsquo;ve been using them to break down the queries into 5,000-row chunks (which is Appian&amp;rsquo;s record limit per call), just to avoid timeouts. But I agree this isn&amp;rsquo;t a sustainable or clean long-term solution.&lt;/p&gt;
&lt;p class="" data-start="1749" data-end="1762"&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147116?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 12:11:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c7d31c12-b41f-4b7f-b517-12531fa62de1</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p class="" data-start="193" data-end="262"&gt;Thanks for following up &amp;mdash; let me clarify&amp;nbsp;the use case in more detail:&lt;/p&gt;
&lt;p class="" data-start="264" data-end="292"&gt;I&amp;rsquo;m working with two tables:&lt;/p&gt;
&lt;ul data-start="294" data-end="385"&gt;
&lt;li class="" data-start="294" data-end="341"&gt;
&lt;p class="" data-start="296" data-end="341"&gt;&lt;strong data-start="296" data-end="313"&gt;Tickets table&lt;/strong&gt; &amp;ndash; around &lt;strong data-start="323" data-end="339"&gt;700,000 rows&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li class="" data-start="342" data-end="385"&gt;
&lt;p class="" data-start="344" data-end="385"&gt;&lt;strong data-start="344" data-end="359"&gt;Tasks table&lt;/strong&gt; &amp;ndash; over &lt;strong data-start="367" data-end="385"&gt;8 million rows&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="" data-start="387" data-end="571"&gt;There&amp;rsquo;s a &lt;strong data-start="397" data-end="425"&gt;one-to-many relationship&lt;/strong&gt; between them: each ticket can have multiple tasks. A single employee might be assigned to the same ticket multiple times through different tasks.&lt;/p&gt;
&lt;h3 class="" data-start="573" data-end="599"&gt;What I&amp;#39;m trying to do:&lt;/h3&gt;
&lt;p class="" data-start="600" data-end="718"&gt;I need to &lt;strong data-start="610" data-end="634"&gt;retrieve all tickets&lt;/strong&gt; that a specific employee has been involved with, based on their task assignments.&lt;/p&gt;
&lt;p class="" data-start="720" data-end="944"&gt;So while an employee might not have 100,000 active tasks in the usual &amp;ldquo;to-do&amp;rdquo; sense, &lt;strong data-start="805" data-end="875"&gt;the join between these tables can result in very large result sets&lt;/strong&gt;, especially for employees who have worked on many tickets over time.&lt;/p&gt;
&lt;h3 class="" data-start="946" data-end="980"&gt;Why pagination is challenging:&lt;/h3&gt;
&lt;p class="" data-start="981" data-end="1295"&gt;Normally, I would definitely use pagination. But in this case, business users want to &lt;strong data-start="1067" data-end="1111"&gt;see and analyze the full list of tickets&lt;/strong&gt; for an employee &amp;mdash; it&amp;rsquo;s more of a &lt;strong data-start="1145" data-end="1167"&gt;reporting/auditing/&lt;span&gt;Follow-up-on-tickets&lt;/span&gt;&lt;/strong&gt; scenario than a task management one. They often export this data or perform cross-referencing, so partial views aren&amp;rsquo;t helpful.&lt;/p&gt;
&lt;h3 class="" data-start="1297" data-end="1333"&gt;Regarding &lt;code data-start="1311" data-end="1320"&gt;forEach&lt;/code&gt; and &lt;code data-start="1325" data-end="1332"&gt;union&lt;/code&gt;:&lt;/h3&gt;
&lt;p class="" data-start="1334" data-end="1601"&gt;Totally fair point &amp;mdash; I know they&amp;rsquo;re not ideal for large datasets. I&amp;rsquo;ve been using them to break down the queries into 5,000-row chunks (which is Appian&amp;rsquo;s record limit per call), just to avoid timeouts. But I agree this isn&amp;rsquo;t a sustainable or clean long-term solution.&lt;/p&gt;
&lt;p class="" data-start="1749" data-end="1762"&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147104?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 06:16:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea6b420c-9adf-45e0-a345-758009189de6</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;To be honest, this feels more like a business problem than a technical problem.&lt;/p&gt;
&lt;p&gt;You could just connect something like PowerBI to that database.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147102?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 04:42:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d8bbfb1-0f4b-4372-8f71-0894c7a64094</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;1. How can a single person have 100K tasks?&lt;/p&gt;
&lt;p&gt;2. Why can&amp;#39;t you paginate the data?&lt;/p&gt;
&lt;p&gt;3. Why are you using forEach (should never use that on big datasets)&lt;/p&gt;
&lt;p&gt;4. Same goes for union.&lt;/p&gt;
&lt;p&gt;If you need to crunch numbers and report on this data, I would suggest materialized views if performance is a concern. But if its just listing the tasks, there&amp;#39;s not much more you can do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147101?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 23:48:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fcd654af-3607-4e18-b32b-d7024f5e6993</guid><dc:creator>Mohammed Dyab</dc:creator><description>&lt;p class="" data-start="145" data-end="169"&gt;Thanks for the response!&lt;/p&gt;
&lt;p class="" data-start="171" data-end="302"&gt;I completely agree that in most scenarios, paging is the ideal solution &amp;mdash; especially for improving performance and user experience.&lt;/p&gt;
&lt;p class="" data-start="304" data-end="585"&gt;To clarify, the goal here is to display a full task list for certain users who have over &lt;strong data-start="393" data-end="419"&gt;100,000 tasks assigned&lt;/strong&gt; to them. Due to business requirements, we need to &lt;strong data-start="470" data-end="544"&gt;load all of these tasks into a table for review and reporting purposes&lt;/strong&gt;, not just page through a limited subset.&lt;/p&gt;
&lt;p class="" data-start="587" data-end="1012"&gt;When I try to use &lt;code data-start="605" data-end="618"&gt;queryEntity&lt;/code&gt; to retrieve all tasks in one go, it becomes &lt;strong data-start="663" data-end="676"&gt;very slow&lt;/strong&gt; and degrades system performance. To work around this, I&amp;rsquo;ve been splitting the queries into multiple 5,000-row batches using &lt;code data-start="801" data-end="810"&gt;foreach&lt;/code&gt;, and combining results using &lt;code data-start="840" data-end="847"&gt;union&lt;/code&gt;. This works, but I&amp;rsquo;m worried it&amp;rsquo;s not scalable and adds a lot of complexity &amp;mdash; especially since it involves &lt;strong data-start="955" data-end="1011"&gt;creating multiple records pointing to the same table&lt;/strong&gt;.&lt;/p&gt;
&lt;p class="" data-start="1014" data-end="1191"&gt;So my question is:&lt;br data-start="1032" data-end="1035" /&gt; &lt;strong data-start="1035" data-end="1189"&gt;Is there a better way to retrieve large datasets in Appian (like 100k+ rows) efficiently, without redesigning the system or creating multiple records?&lt;/strong&gt;&lt;/p&gt;
&lt;p class="" data-start="1193" data-end="1300"&gt;Would appreciate any suggestions &amp;mdash; maybe something database-side or a smarter way to load/display the data?&lt;/p&gt;
&lt;p class="" data-start="1302" data-end="1315"&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way to get all data for user from table that contains 8 million rows</title><link>https://community.appian.com/thread/147100?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 23:39:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4c10a433-6660-4069-8fc4-234c621117cc</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;What are you trying to accomplish? In pretty much every use case you should be paging through the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>