Viewing 15 posts - 48,226 through 48,240 (of 49,552 total)
I don't have your tables handy, so I can't run that query. Maybe this will suffice. Against a SQL 2005 SP2 server
select name, object_id, type_desc, create_date, create_date
from sys.objects
-- Runs fine....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 3:02 pm
The order by clause runs after the aliases in the select have been applied. This is most likely undefined behaviour deriving from technically incorrect SQL. Most likely whichever column gets...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 4:42 am
As an alternative to local variables, I would suggest that you change the procs back to using parameters and mark each proc WITH RECOMPILE.
With variables you'll get average performance, never...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 4:35 am
Jeff Moden (11/13/2007)
...and here's your advantage... I don't have 2k5 to play with... I have to do it using only T-SQL 'cause I only have 2k. 😉
Is not fair then....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 4:10 am
With this, you're going to have to resort to dynamic SQL. Build up the statement as a string, then execute it. (sp_executesql)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 1:31 am
The other problem with that is that when the proc compiles, all of the selects compile, based on the values of the parameters for that call. That's even if the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 1:28 am
Shuffle, shuffle, shuffle the pages... I wrote a post about this, after encountering way too many people shrinking databases for no good reason. (http://sqlinthewild.co.za/index.php/2007/09/08/shrinking-databases/%5B/url%5D) I've had an uphill battle with...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 1:20 am
Do you mean compatability mode? (80,90,...)?
I doubt it will. All the compat mode does is enable of disable the new features. It does not make the server behave like an...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 1:16 am
Mark Manis (11/9/2007)
I guess there are mixed opinions of this out there, because another DBA told me this was the preferred method and it seems to work well for me.
There's...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 1:12 am
Jeff Moden (11/9/2007)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 12:55 am
You can use profiler to capture the insert statements, and also to check is the app is doing a begin transaction before the insert and when/if it is doing the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 12:51 am
-- For SQL 2005
SELECT STATS_DATE(object_id, index_id), object_name(object_id)
from sys.indexes where object_id = object_id('TableNameHere')
Edit: Just noticed your on SQL 2000....
Not exactly the same, cause of the changes to the system...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 12:47 am
Look up sp_helptrigger in Books Online
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 13, 2007 at 12:28 am
emamet (11/9/2007)
Yes, I was planning to select very few events and columns as well as putting a filter on duration.
When you set up your filter, remember that durations are measures...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 9, 2007 at 4:10 am
Agreed. Don't use the profiler GUI when tracing against production servers. The server-side trace procs are a much better idea.
Basically, you don't want to be sending the trace info across...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 9, 2007 at 3:31 am
Viewing 15 posts - 48,226 through 48,240 (of 49,552 total)