<?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>Insertion of rows in DB table taking too long</title><link>https://community.appian.com/discussions/f/data/17787/insertion-of-rows-in-db-table-taking-too-long</link><description>Hi All, 
 I am trying to insert about 700 rows into a table using a!writeToDataStoreEntity Smart service as well as function. With both of these approaches, it takes about 1.5 to 2 minutes to write to DB ( SQL Server 2012). 
 I tried with a smaller datasubset</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Insertion of rows in DB table taking too long</title><link>https://community.appian.com/thread/70001?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 08:56:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ff69c27f-581b-4c19-90cc-7f5e9e7d217b</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;A few things to check:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;what secondary indexing do you have applied on the database table? Inserts will make the database update any secondary indexes which will make the inserts slower&lt;/li&gt;
&lt;li&gt;what size is the data being inserted? have you checked to see if the network is not acting as a bottleneck for this activity?&lt;/li&gt;
&lt;li&gt;what &amp;#39;updates&amp;#39; do the users need to see after the insert? If there is nothing different (other than perhaps the Primary Key being generated) you do not need to &amp;#39;refresh&amp;#39; the data from the database after the insert because it will effectively be identical&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>