<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Time Taken for stored procedures to execute in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215213#M98841</link>
    <description>&lt;P&gt;I would consider doing this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz procedure=* ("Started processing" OR "Finished processing")
| transaction procedure startswith="Started processing" endswith="Finished processing" keepevicted=f
| timechart avg(duration) as AvgDuration by procedure span=1h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;assuming that "procedure" is the name of the field that contains the names of the stored procedures (sproc1, etc.).&lt;/P&gt;

&lt;P&gt;However, if your dataset is very large, the transaction command will consume a lot of memory and may not work well.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2015 23:45:09 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2015-11-10T23:45:09Z</dc:date>
    <item>
      <title>Time Taken for stored procedures to execute</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215211#M98839</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have an application with about 10 stored procedure calls made via Linq.   I'd like to track the performance of the stored procedure.  There is currently no tracing/logging in place for these calls.&lt;/P&gt;

&lt;P&gt;What is the most efficient way to instrument the call so that splunk can report on the avg time taken and show trends in a dashboard as well as send alerts when a threshold has been released.&lt;/P&gt;

&lt;P&gt;The two options are, I think are:&lt;/P&gt;

&lt;H1&gt;1.    Start and Finish tracing statements.&lt;/H1&gt;

&lt;PRE&gt;&lt;CODE&gt;       Started processing sproc1
       exec sproc1(param1, param2)
       Finished processing sproc1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H1&gt;2.    A single tracing statement with timeTaken when the stored procedure finishes.&lt;/H1&gt;

&lt;P&gt;i.e.   finished executing sproc1 in 1114 ms&lt;/P&gt;

&lt;P&gt;Please let me know if you have any thoughts on the best way to accomplish this.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 19:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215211#M98839</guid>
      <dc:creator>mshea</dc:creator>
      <dc:date>2015-11-06T19:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Time Taken for stored procedures to execute</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215212#M98840</link>
      <description>&lt;P&gt;Have you considered using Splunk Stream app.  If this is a DB Stream can capture request and response time for the stored procedure by grabbing the information on the wire.   Works for TDS, mysql, and Postgress.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 23:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215212#M98840</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2015-11-10T23:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Time Taken for stored procedures to execute</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215213#M98841</link>
      <description>&lt;P&gt;I would consider doing this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz procedure=* ("Started processing" OR "Finished processing")
| transaction procedure startswith="Started processing" endswith="Finished processing" keepevicted=f
| timechart avg(duration) as AvgDuration by procedure span=1h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;assuming that "procedure" is the name of the field that contains the names of the stored procedures (sproc1, etc.).&lt;/P&gt;

&lt;P&gt;However, if your dataset is very large, the transaction command will consume a lot of memory and may not work well.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 23:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Time-Taken-for-stored-procedures-to-execute/m-p/215213#M98841</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-11-10T23:45:09Z</dc:date>
    </item>
  </channel>
</rss>

