<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Make sql run faster</title><link>https://community.appian.com/discussions/f/general/20878/make-sql-run-faster</link><description>Hi 
 I am having issues with the following sql running too slow so that the Tempo report using it fails. 
 
 CREATE OR REPLACE VIEW TCAP_PROPOSAL_RECORD_VW AS SELECT DISTINCT S.SECURITY_ROLE AS SECURITY_ROLE ,Z.ID AS ID ,Z.COLLEGE_CL_CODE AS COLLEGE_CL_CODE</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Make sql run faster</title><link>https://community.appian.com/thread/81593?ContentTypeID=1</link><pubDate>Thu, 13 May 2021 03:00:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36a2d5f2-83ae-40cb-b36a-c9a8b096d931</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;If at all possible, I would still consider doing something about all those sub-queries.&amp;nbsp; In many cases they wind up in a place where they can&amp;#39;t be optimized by the DB engine.&amp;nbsp; See if there&amp;#39;s any way to convert even one of the sub-queries into a simple join it may result in huge time savings, especially if you can index some of the tables involved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make sql run faster</title><link>https://community.appian.com/thread/81557?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 04:32:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00004e8d-d0e0-4b4a-a11e-fd21fdc35c52</guid><dc:creator>ireneb</dc:creator><description>&lt;p&gt;This has been fixed.&amp;nbsp; The issue was not with the sql but with the query rule that was calling the view.&amp;nbsp; Slight changes were made to the view, however.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make sql run faster</title><link>https://community.appian.com/thread/81365?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 17:51:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f624438-a6a0-4d66-ba48-cac4f6b76cc1</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Yeah I think it would be helpful to know your use full case - what data are you displaying and how are you showing it? Often in cases like this there are a lot of possible ways to fix the issue, and many of the possible fixes don&amp;#39;t even involve database tuning at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make sql run faster</title><link>https://community.appian.com/thread/81354?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 16:11:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc72b995-59f1-41a2-955e-7232b563ae21</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Before we would want to begin tuning your SQL, we would want to confirm how your Tempo report is utilizing paging - are you returning say 10 or 15 rows, or trying to return all rows in the DB, etc?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>