Viewing 15 posts - 20,206 through 20,220 (of 49,552 total)
You have this code towards the bottom
SELECT week_num, work_date, u.unit_description, s.shift_id, sh.shift_description
FROM #GET_ORG_SKED
WHERE work_date = d.dt
There are...
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
February 20, 2012 at 1:30 pm
That said, executing a procedure inside a trigger is often a sign of a poorly written trigger. What's usually better is to write the logic directly in the trigger so...
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
February 20, 2012 at 10:44 am
Replace
AND
es.work_date between '@start_date' and '@end_date'
with
AND
es.work_date between @start_date and @end_date
By putting the quotes, you made those literal string values, not parameters and SQL was trying to convert the string '@start_date' to...
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
February 20, 2012 at 10:42 am
Well shrinking TempDB online is documented to sometimes cause corruption so....
The shrink dialogue usually works fine, so try DBCC UPDATEUSAGE
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
February 20, 2012 at 8:02 am
GSquared (2/17/2012)
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
February 20, 2012 at 6:48 am
erikpoker (2/20/2012)
GilaMonster (2/20/2012)
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
February 20, 2012 at 6:13 am
EXISTS returns true or false depending on whether a row exists in the subquery or not, so your example will delete either all the rows in the table (if that...
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
February 20, 2012 at 5:46 am
DBA Rafi (2/20/2012)
1. if with 3rd SELECT, the big value was recognized with bigger datatype (here numeric), but why this did not happened with 2nd SELECT?
Because the second value...
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
February 20, 2012 at 5:02 am
snigdhandream (2/20/2012)
I tried everything, but nothing is faster or slower... everything is taking equal ms.. some times +/- 2 or 3 ms...
Exactly, so stop worrying about NOT IN and spend...
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
February 20, 2012 at 5:00 am
Please note: 5 year old thread.
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
February 20, 2012 at 3:54 am
Have you considered one of the snapshot isolation levels?
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
February 20, 2012 at 3:52 am
So you've tried creating the suggested index and know (not guess) that it won't have any effect? You've tried an IN instead and seen that it's faster?
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
February 20, 2012 at 3:50 am
anthony.green (2/20/2012)
force a checkpoint, detach the database, delete the ldf, then use CREATE DATABASE.........FOR ATTACH
No!!
That's a really, really good way to lose or damage a database badly, especially 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
February 20, 2012 at 3:49 am
GilaMonster (2/20/2012)
Please read through this - Managing Transaction Logs[/url] and this: http://www.sqlservercentral.com/articles/Transaction+Log/72488/
p.s. restricted growth of 2 TB (what you say it is), is the same as unrestricted, so focus on...
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
February 20, 2012 at 3:08 am
And you've tested and confirmed that NOT IN does indeed have performance problems?
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
February 20, 2012 at 3:08 am
Viewing 15 posts - 20,206 through 20,220 (of 49,552 total)