<?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/"><channel><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases</link><pubDate>Thu, 18 Apr 2024 16:06:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Current Revision posted to Article by Appian Max Team on 4/18/2024 4:06:55 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="required_actors"&gt;Required Actors&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h4 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/12</link><pubDate>Thu, 18 Apr 2024 16:03:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Appian Max Team</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 12 posted to Article by Appian Max Team on 4/18/2024 4:03:44 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="required_actors"&gt;Required Actors&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h4 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/11</link><pubDate>Thu, 02 Nov 2023 13:31:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 11 posted to Article by joel.larin on 11/2/2023 1:31:01 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="required_actors"&gt;Required Actors&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h4 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/10</link><pubDate>Thu, 02 Nov 2023 13:29:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 10 posted to Article by joel.larin on 11/2/2023 1:29:44 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h4 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/9</link><pubDate>Thu, 02 Nov 2023 13:29:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 9 posted to Article by joel.larin on 11/2/2023 1:29:19 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h3 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h3&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/8</link><pubDate>Thu, 02 Nov 2023 13:26:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 8 posted to Article by joel.larin on 11/2/2023 1:26:30 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h3 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/7</link><pubDate>Tue, 31 Oct 2023 20:53:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Kim Day</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 7 posted to Article by Kim Day on 10/31/2023 8:53:29 PM&lt;br /&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h3 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (&lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.SQL=DEBUG&lt;/span&gt; and &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;log4j.logger.org.hibernate.type=TRACE&lt;/span&gt;) in &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;appian_log4j.properties&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicBinder&lt;/span&gt; entry and the first &lt;span style="background-color:#e6e6e6;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BasicExtractor&lt;/span&gt; entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/6</link><pubDate>Tue, 31 Oct 2023 20:47:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Kim Day</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 6 posted to Article by Kim Day on 10/31/2023 8:47:27 PM&lt;br /&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h3 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (log4j.logger.org.hibernate.SQL=DEBUG and log4j.logger.org.hibernate.type=TRACE) in appian_log4j.properties&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h3&gt;
&lt;p&gt;The difference between the last BasicBinder entry and the first BasicExtractor entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/5</link><pubDate>Tue, 31 Oct 2023 20:46:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Kim Day</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 5 posted to Article by Kim Day on 10/31/2023 8:46:27 PM&lt;br /&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="checklists"&gt;Checklists&lt;/h2&gt;
&lt;h3 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (log4j.logger.org.hibernate.SQL=DEBUG and log4j.logger.org.hibernate.type=TRACE) in appian_log4j.properties&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h2&gt;
&lt;p&gt;The difference between the last BasicBinder entry and the first BasicExtractor entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/4</link><pubDate>Tue, 31 Oct 2023 20:35:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>Kim Day</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 4 posted to Article by Kim Day on 10/31/2023 8:35:45 PM&lt;br /&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (log4j.logger.org.hibernate.SQL=DEBUG and log4j.logger.org.hibernate.type=TRACE) in appian_log4j.properties&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h2&gt;
&lt;p&gt;The difference between the last BasicBinder entry and the first BasicExtractor entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: integrations, database, monitoring, Architecture&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/3</link><pubDate>Tue, 17 Oct 2023 19:03:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 3 posted to Article by matt.cosenza on 10/17/2023 7:03:35 PM&lt;br /&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (log4j.logger.org.hibernate.SQL=DEBUG and log4j.logger.org.hibernate.type=TRACE) in appian_log4j.properties&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h2&gt;
&lt;p&gt;The difference between the last BasicBinder entry and the first BasicExtractor entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/2</link><pubDate>Tue, 17 Oct 2023 19:02:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>matt.cosenza</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 2 posted to Article by matt.cosenza on 10/17/2023 7:02:51 PM&lt;br /&gt;
&lt;div&gt;
&lt;p&gt;This page describes the recommended approach to database operations with slow execution phases, which is the case if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The database is identified as the root cause for a slow interface (possibly using the &lt;a href="/w/guide/3317/interface-performance-and-debugging"&gt;Interface Performance and Debugging&lt;/a&gt; section as a guide)&lt;/li&gt;
&lt;li&gt;You determined that the execute phase was the longest phase of your query execution operation&lt;/li&gt;
&lt;li&gt;You optimized slow running queries in the database. Follow, &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; if you need assistance in optimizing your database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="required_actors"&gt;Required Actors&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database Administrator&lt;/li&gt;
&lt;li&gt;Network Administrator&lt;/li&gt;
&lt;li&gt;Appian Administrator/Cloud Technical Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="database_administrator_checklist"&gt;Database Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn on Trace Database Logging (Ex: SQL Profiler in SQL Server)&lt;/li&gt;
&lt;li&gt;Database trace logging should include request received time, response sent time and database locking information&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="network_administrator_checklist"&gt;Network Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turn debugging (i.e. tcpdump) for packets which are routed from Appian to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_administrator_checklist"&gt;Appian Administrator Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set hibernate debugging to TRACE (log4j.logger.org.hibernate.SQL=DEBUG and log4j.logger.org.hibernate.type=TRACE) in appian_log4j.properties&lt;/li&gt;
&lt;li&gt;Turn on expression trace logging.&lt;/li&gt;
&lt;li&gt;Ensure that the network and database administrators activated network packet debugging and database debugging respectively&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="analyzing_the_log_files"&gt;Analyzing the Log Files&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Collect and collate the log files from Appian, the Database and the Network Administrator into a single table like the one below&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="appian_example_log_file"&gt;Appian Example Log File&lt;/h2&gt;
&lt;p&gt;The difference between the last BasicBinder entry and the first BasicExtractor entry represent the round trip between Appian and the database.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;2015-10-10 03:17:13,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] DEBUG org.hibernate.SQL - select top 1 this_.[customerid] as y0_ from [customer] this_ where (this_.[customerid]=?)
2015-10-10 03:17:13,321 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicBinder** - binding parameter [1] as [INTEGER] - 12345
2015-10-10 03:17:57,123 [Appian Work Item - 0 - ProcessExec01 : ExpressionGroupRequest] TRACE org.hibernate.type.descriptor.sql.**BasicExtractor** - found [12345] as column [y0_]&lt;/pre&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You may need to run the trace logging during a time of low or no load if the amount of trace logging messages are unmanageable.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_1:_network_latency"&gt;Example 1: Network Latency&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:33&lt;/td&gt;
&lt;td&gt;20s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;2s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:35&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;22s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent during transport of the request and the response back and forth between Appian and the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the network administrator if a majority of the time is spent on the network&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="example_2:_database_bottleneck"&gt;Example 2: Database Bottleneck&lt;/h2&gt;
&lt;table class="appianTable" width="0%"&gt;
&lt;thead&gt;
&lt;tr class="header"&gt;
&lt;th width="0%"&gt;Timing&lt;/th&gt;
&lt;th width="0%"&gt;Log Timestamp&lt;/th&gt;
&lt;th width="0%"&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last BasicBinder statement&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:13&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Receives Query&lt;/td&gt;
&lt;td&gt;3:17:14&lt;/td&gt;
&lt;td&gt;2s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Sends Response&lt;/td&gt;
&lt;td&gt;3:17:55&lt;/td&gt;
&lt;td&gt;41s Database Time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Receives Packet&lt;/td&gt;
&lt;td&gt;3:17:56&lt;/td&gt;
&lt;td&gt;0s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First BasicExtractor Statement&lt;/td&gt;
&lt;td&gt;3:17:57&lt;/td&gt;
&lt;td&gt;1s Network Latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total Time&lt;/td&gt;
&lt;td&gt;44s&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Expression Trace Time&lt;/td&gt;
&lt;td&gt;46s&lt;/td&gt;
&lt;td&gt;2s Appian Overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice that a majority of the time is spent on the database.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the database administrator if a majority of the time is spent on the database Review the &lt;a href="/w/guide/3309/database-performance-best-practices"&gt;Database Performance Best Practices&lt;/a&gt; to improve the query execution times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Determine which area is responsible for the majority of the execution time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Contact the Appian Cloud team if the majority of time is spent between Appian and the server hosting the VPN connection&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Database Operations with Slow Execution Phases</title><link>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases/revision/1</link><pubDate>Thu, 31 Aug 2023 19:05:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16a1f3f3-5b61-45d9-a4fd-2ea826c23eb2</guid><dc:creator>joel.larin</dc:creator><comments>https://community.appian.com/success/w/article/3257/database-operations-with-slow-execution-phases#comments</comments><description>Revision 1 posted to Article by joel.larin on 8/31/2023 7:05:31 PM&lt;br /&gt;
&lt;p&gt;temp&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>