Splunk Search

Retrieve slow queries in splunk search

pgadge
New Member

Hi Guys,

I am very new to splunk and operating on thew following data. I want to retrieve SQL queries which take more than 4 secs. My data looks like this,

Time: 130114 18:25:24

User@Host: web-03-prod-01[web-03-prod-01] @ [10.2.2.88]

Query_time: 4.137378 Lock_time: 0.000114 Rows_sent: 248 Rows_examined: 1777155

How can I use > or < operator to retrieve data which has a Query_time value more than 4 secs.

Tags (1)
0 Karma
1 Solution

Ayn
Legend

First make sure you have the query time extracted as a field. See the following section in the docs: http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime

Then you can just do

query_time>4

in your search.

View solution in original post

0 Karma

Ayn
Legend

First make sure you have the query time extracted as a field. See the following section in the docs: http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Addfieldsatsearchtime

Then you can just do

query_time>4

in your search.

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...