Viewing 13 posts - 16 through 28 (of 28 total)
Lamprey13 (9/9/2011)
Can post the code? We might be able to help with some suggestions. If it's...
September 9, 2011 at 12:35 pm
Sorry, I should clarify: it is a table valued function that uses table variables.
September 9, 2011 at 12:28 pm
Temp tables do speed things up when I run the individual queries that make up the function. However, table valued functions can't use temp tables.
September 9, 2011 at 12:18 pm
FredFlintst0ne (3/10/2010)
I have a user-defined table function that returns a small resultset (~200 rows).
The user-defined table function employs...
September 9, 2011 at 12:00 pm
Having the same problem.
Apparently there is a hotfix for SQL 2008:
Seems to be a known issue. You can try switching the Compatibility level back to 2005 to confirm
September 9, 2011 at 11:57 am
The goal here is to identify procs that may need a rewrite. I'm trying to think of a way to create benchmarks for procs using a comparison to other procs...
June 13, 2011 at 2:50 pm
That makes sense now, I switched to dm_exec_sql_text and I guess our DB is still on 2005. I'll look into sys.dm_exec_procedure_stats as soon as we update.
Thanks for your help!
June 13, 2011 at 2:45 pm
I think its an aggregate per plan not per procedure. In any case, I get duplicate entries when I don't use aggregates.
I'd Like to use dm_exec_sql_text but I don't have...
June 13, 2011 at 1:06 pm
How could I do this better? Are there any useful criteria I've left out? This seems to revolve around disk usage, can you see a way to add cpu benchmarks?
June 13, 2011 at 10:55 am
allmhuran (6/13/2011)
June 13, 2011 at 9:37 am
This is a start, you could develop this further:
SELECT
last_execution_time
, name
, text
FROM
sys.dm_exec_query_stats AS DMExQryStats
CROSS APPLY fn_get_sql(DMExQryStats.sql_handle)
LEFT...
June 13, 2011 at 9:35 am
This one is similar but not parameterized for different objects. It creates a separate .sql file for each object on your servers's C drive in the directory SP_BAK (which you...
May 26, 2011 at 10:41 am
This proc creates a mass creation script for all your objects
CREATE PROC ITX_SP_DS_SP_BAK
@P INT,
@FN INT,
@v-2 INT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @t TABLE (Test INT)
declare c cursor local for
(
SELECT
name...
May 26, 2011 at 10:39 am
Viewing 13 posts - 16 through 28 (of 28 total)