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!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...