In SQL XE for sp/rpc/stmt completed events it will be great if we can include wait types like IO/Network waits etc. Just like we can see reads/cpu/duration, If we can also gets other resource waits, we can get a good idea why sql is slow during scenarios where the duration/CPU is high and reads are low.
sql waits for sp/rpc/stmt completed and other events
220 Views Asked by Ranga N At
1
There are 1 best solutions below
Related Questions in SQL-SERVER
- SQL server not returning all rows
- Big data with spatial queries/indexing
- Conditional null constraint on Null
- SQL Query - Order by String (which contains number and chars)
- Optimising a slow running SQL Server Stored procedure ordered by calculated fields to return a closest match
- Dynamics CRM Publishing Customizations - Multi Developers
- Is there anyway to set the relationship of many tables from Model?
- Implementation of Rank and Dense Rank in MySQL
- ORM Code First versa Database First in Production
- MVC : Insert data to two tables
- Data streams in case of Merge
- table with multiple IDs but seperate notes need sorting (Tried SQL code to make a union query)
- SQL table Partitioning by Year with ColumnStore index implemented on the table
- Defining which network to use for SQL Server 2012 Management Studio
- Fill a week days in a table with preceding Sundays value
Related Questions in SQLPERFORMANCE
- TVF is much slower when using parameterized query
- Performance of SQL code
- Need a MySQL JOIN to return all categories a product is in, per product, even if only one category is searched for
- Any ideas on why this query would run so slow?
- How to force MySQL "Using index for group-by"
- SQL Server : Geography search performance - query nearest stores
- Index on join and where
- SQL Server query is very slow when number of items inside IN clause more than 4
- MySQL doesn't use entire index when combining join and range
- Performance issue with SQL Server and XML datatype columns
- Checking variable for NULL kills performance
- MySQL - does log record the deleted query of a parent-child table?
- Insert query taking time to load the data into a table in Oracle
- Finding the slow stored procedures from a Trace file
- mysql very high cpu usage
Related Questions in EXTENDED-EVENTS
- Java + Ms SQL Server 2008 R2 after insert trigger notification
- Extended Event force order of sys.fn_xe_file_target_read_file() DMF results
- How can I replicate the functionality of sp_trace with extended events from C#?
- Deadlock graph from Extended Events not showing
- Extended events and linked server calls received
- Extended Events for Server/Database Audit
- Does Microsoft.SqlServer.XEvent.XELite.XELiveEventStreamer work with SSAS ring_buffer or event_stream?
- How to read extended events through the .net code
- Capture Linked server queries using SQL Extended Events
- Who created this Extended Events session?
- SSAS Tabular Extended Events Session Randomly Deleted
- Start SQL Server extended event session using c#
- SQL query executes in C# but it does not return any result
- Extended Events connection_id vs client_connection_id
- How Do I find the user for an extended event?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can actually track the wait statistics of a query but the other way around - by tracking the wait statistics themselves. Take a look at the following snippet and the result image:
Here we capture the end of every wait (this is done because at this point SQL Server knows the duration of the statistic, so we can output it int he result) that has has duration greater than 0. In the ACTION part we retrieve the database name, the text of the query that caused the statistic and the session id of the query.
Beware though. Tracking wait statistics through Extended Events(and not through sys.dm_os_wait_stats that collects aggregate data) can generate a ton of data overwhelmingly fast. Should you choose this method, you should define very carefully which wait statistics you want to keep track of and what from what duration on the statistic causes you problem.