<?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>Nested CDT takes too long to query data</title><link>https://community.appian.com/discussions/f/best-practices/40335/nested-cdt-takes-too-long-to-query-data</link><description>Hi everyone, 
 I&amp;#39;m having a multi layer nested CDT (Nested CDT that is a column in another nested CDT column of the main CDT that uses as data type) which is taking too long to query data and sometimes causes time out error. I would love to have some</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Nested CDT takes too long to query data</title><link>https://community.appian.com/thread/154247?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2026 10:13:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3b23dfa-8f60-4cc8-9120-424697e0ffc8</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;Appian doesnt recommend to use Nested CDTs in general. So better to normalise the cdts using foreign keys would be the best approach, if feasible. Or even move to record type/ data fabric!&lt;/p&gt;
&lt;p&gt;For time out, find the cause of the time out in query. E.g. try querying 1,10 or 100 rows as per need to find the root of the timeout issue.&lt;/p&gt;
&lt;p&gt;Another suggestion is if you are querying to show data in a grid, which is why you might need to query multiple rows - query just the main record data (except nested cdts) and show them in grid. The relative nested data can be queried and shown in separate UI component for each row - thus nested data will be queried one for each row rather than multiple at once.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can discuss further for each of the above approaches, yet hope these general suggestions help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nested CDT takes too long to query data</title><link>https://community.appian.com/thread/154246?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2026 10:09:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b6dd19d6-966d-4734-ab76-4f873d4224a8</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Deeper nesting can create an N+1 query problem and slow queries or timeouts.&lt;br /&gt;Create a DB view with the required JOINs and map it to a single flat CDT. Then query that view with one a!queryEntity() call, using paging and only the fields you need.&amp;nbsp;&lt;br /&gt;For longer-term maintainability, consider Record Types with Relationships(Replace deep nested CDTs with flat related CDTs)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nested CDT takes too long to query data</title><link>https://community.appian.com/thread/154245?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2026 09:39:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:534390c3-3de4-4f3c-ac6e-add4ef3e2ada</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Well, you will have to analyze why it takes so much time. Try to fetch only the data you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>