Profile

Cover photo
Mordechai Danielov
43 followers|17,387 views
AboutPostsPhotosYouTube

Stream

Mordechai Danielov

Shared publicly  - 
 
MySQL performance - mystery no more
1
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
got some convincing to do? Here is a method that may work
Inc.com
Contrary to what you might think, providing evidence just isn't the right way to be more persuasive. Try this instead.
1
Add a comment...

Mordechai Danielov

commented on a post on Blogger.
Shared publicly  - 
 
sometimes calling dm_exec_text_query_plan with DEFAULT,DEFAULT also returns a null. if you pass the offset values from dm_exec_query_stats, it should return a plan for that query (if not for the entire SP/Function)

use my_db
GO
select * from (
select-- top 20 
qs.creation_time
,qs.last_execution_time
,qs.execution_count
,tp.query_plan 
, SUBSTRING(qt.text, (qs.statement_start_offset/2)+1,((CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(qt.text) ELSE qs.statement_end_offset  END - qs.statement_start_offset)/2) + 1) AS statement_text
,cast (tx.query_plan AS XML) [statement_plan]
from sys.dm_exec_query_stats (nolock) qs
CROSS APPLY sys.dm_exec_sql_text (qs.sql_handle) AS qt
OUTER APPLY sys.dm_exec_query_plan(qs.plan_handle) tp 
OUTER APPLY sys.dm_exec_text_query_plan(qs.plan_handle,qs.statement_start_offset,qs.statement_end_offset) tx
where 1=1
AND qt.dbid=db_id('my_db')
AND qt.objectid=object_id('my_sp')
--AND tp.query_plan is not NULL
--AND qs.execution_count>500
) TB
--WHERE statement_text like 'filter something%'
order by last_execution_time desc
1
Patrick Keisler's profile photo
 
Thank you. I'll try this the next time I run into the same issue.
Add a comment...

Mordechai Danielov

Shared publicly  - 
1
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
Interesting that Google is starting to question the value of college education. 
1
Add a comment...
In his circles
49 people
Have him in circles
43 people
Micah Norman's profile photo
‫נינו עמר‬‎'s profile photo
levi atanelov's profile photo
Nahum Kovalski's profile photo
Orly Amsalem's profile photo
nahid jesri's profile photo
Boris Nadion's profile photo
‫ספי רייכקינד‬‎'s profile photo
Dror Gliksman's profile photo

Mordechai Danielov

Shared publicly  - 
SQL server memory management. fundamental approach. Explains about Windows OS and SQLOS memory usage
1
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
parsing is like eating vegetables. Everyone knows it's good for you, but most prefer chocolate.
1
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
this is how IT should be done
1
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
dangerous tools can often be the best tools. Use it responsibly. :)
1
Add a comment...

Mordechai Danielov

commented on a post on Blogger.
Shared publicly  - 
 
thanks!! It would have taken me 20 years to figure this out.
1
1
Ryan Volpe's profile photo
Add a comment...

Mordechai Danielov

Shared publicly  - 
 
Accounting measures that actually make sense? Who would have thought!
1
Add a comment...
People
In his circles
49 people
Have him in circles
43 people
Micah Norman's profile photo
‫נינו עמר‬‎'s profile photo
levi atanelov's profile photo
Nahum Kovalski's profile photo
Orly Amsalem's profile photo
nahid jesri's profile photo
Boris Nadion's profile photo
‫ספי רייכקינד‬‎'s profile photo
Dror Gliksman's profile photo
Basic Information
Gender
Male