<?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>Timeout issue with Query Entity</title><link>https://community.appian.com/discussions/f/general/9117/timeout-issue-with-query-entity</link><description>Hi, We are experiencing problems with a query entity. When we pass a query filter with multiple filters on the same varchar column, the query entity takes around 9 sec to give us the result. When the query entity rule is called from process model it fails</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40830?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2016 00:39:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5f3c4949-073a-4215-bb49-29d53fd0f84d</guid><dc:creator>sanghapriyab</dc:creator><description>We were not able to combine both the NULL and blank string compare in the same query. What we did instead as @benjamins suggested is we ensured is that all the nulls are converted to a blank string.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40708?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 10:08:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7ea7b8e9-1ee7-4bea-bae7-b535fe2f1e99</guid><dc:creator>kondetiv</dc:creator><description>@sanghapriyab Appian documentation says &lt;br /&gt;&lt;br /&gt;When saving the values of a CDT to a database, a NULL value is not stored as NULL - instead, it is stored as an empty string ‘’.&lt;br /&gt;&lt;br /&gt;Appian converts any NULL values of a CDT text field into an empty string. Writing an empty string to the database is safer than writing NULL value; a NULL value if not handled correctly can lead to NULL pointer exceptions.&lt;br /&gt;&lt;br /&gt;When comparing values returned from a data store, use lenb() to check the length in bytes is 0 which would be the equivalent of a NULL value.&lt;br /&gt;&lt;br /&gt;According to this write your query entities and and use lenb() function to know returned value is null or not.&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40705?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 09:01:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cef9bc57-1675-4a73-88ed-01c3a747b191</guid><dc:creator>Arun Theja Muthyalu</dc:creator><description>Having said that, you can have a single filter with IN operator checking for {&amp;quot;&amp;quot;, null()} on the column which is now indexed.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40704?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 08:58:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40ef5d6c-8334-49e0-a876-afd90066035d</guid><dc:creator>Arun Theja Muthyalu</dc:creator><description>@sanghapriyab&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you try including null() in the value array in the same query filter with IN operator?&lt;br /&gt; &lt;br /&gt;Also, Consider creating "Index" on the column mapped to "text_column1".&lt;br /&gt;&lt;br /&gt;I believe having null is better, instead of empty string. So, have a thought about this too.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40700?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 04:43:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e4865f2c-a929-423b-a85c-5677bff235a8</guid><dc:creator>benjamins</dc:creator><description>Agree that IN and OR operations can be expensive. Is there a chance that the data can be empty and null or can you work around that and ensure that the data is always null. Can you expect db scripts to update the database table and ensure any entries that are blank are set to null?&lt;br /&gt;&lt;br /&gt;Setting a batch size to 1 doesn&amp;#39;t mean that the database is not going to be doing a full table scan. Look at the indexes on the table as well. If its a large table, you may need to look at tweaking it as well.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40697?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 03:14:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6b88fe8-72ee-494d-8afa-05cc2421018b</guid><dc:creator>Sally Mason</dc:creator><description>In the first example, there are two query filters that must complete for the &amp;quot;OR&amp;quot; to be evaluated. In the second, there is only one query filter to evaluate. The &amp;quot;IN&amp;quot; can be expensive in terms of time. For some ideals on how to improve your queries performance, please see &lt;a href="https://forum.appian.com/suite/help/16.3/Database_Performance_Best_Practices.html"&gt;forum.appian.com/.../Database_Performance_Best_Practices.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timeout issue with Query Entity</title><link>https://community.appian.com/thread/40696?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 02:57:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f8debed-634b-4aec-83e2-ba92c0275169</guid><dc:creator>Tom Ryan</dc:creator><description>Are you seeing any errors in the app server log? If so please attach the complete log.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>