Viewing 15 posts - 27,466 through 27,480 (of 49,552 total)
Very likely the lack of stats on the table variable, combined with a change in data distribution in the other tables. How many rows are you putting into that table...
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
March 9, 2011 at 11:43 am
Happy with all the effects of read uncommitted?
See - http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/10/how-dirty-are-your-reads.aspx
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
March 9, 2011 at 10:52 am
Gagne (3/9/2011)
My understanding however is that these are reset whenever SQL Server starts up, am I right ?
Nope
I also don't quite understand what you mean about stale statistics,...
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
March 9, 2011 at 10:41 am
SQL 2000 doesn't have sys.databases, it's new in SQL 2005.
DatabasePropertyEx has it (function), see Books Online for details.
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
March 9, 2011 at 10:38 am
Craig Farrell (3/9/2011)
Ah, that explains a few things. I'd wondered who'd pissed in your cheerios yesterday, and was just glad it wasn't me. 😉
Oh, I didn't think it...
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
March 9, 2011 at 10:34 am
pwalter83 (3/9/2011)
Thanks a lot for your answers but would it be possible to convert your solution in a way that they can be included in the WHERE clause section ?
Why?
I...
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
March 9, 2011 at 10:27 am
Yes. It works, but it's up-version only.
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
March 9, 2011 at 10:25 am
Rough guess...
SELECT DISTINCT Item INTO #Trades FROM dbo.Split(@trades,',');
SELECT ....
FROM ....
INNER JOIN #Trades t ON t.Item = CASE WHEN MG_BOOKING.Trade IS NOT NULL THEN MG_BOOKING.Trade ELSE MGS_CurrentReportingVessels.Trade END
AND (MG_BOOKING.Trade IS NULL...
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
March 9, 2011 at 8:13 am
Untested...
WITH diagnostic(numerator, denominator)
AS (SELECT CONVERT(numeric(9,3), (SELECT COUNT(DISTINCT encounter) AS numerator
...
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
March 9, 2011 at 7:58 am
Then that trigger is not correct....
Maybe this
ALTER TRIGGER [dbo].[articlecount]
ON [dbo].[orderitem]
AFTER INSERT
AS
SET NOCOUNT ON;
UPDATE Artiklar
SET [Antalkvar] = Antalkvar...
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
March 9, 2011 at 7:53 am
Can you at least post the definitions of the tables that are involved in this query - MG_BOOKING and MG_BILL (create table statement)? Data types is what I'm most interested...
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
March 9, 2011 at 7:48 am
Pleasure. Just confirm one thing please
What needs to happen if the same artikelnr is inserted multiple times in one batch? Subtract 1 or subtract the total number of times its...
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
March 9, 2011 at 7:24 am
Does this correctly describe the results you want back? If not, what's wrong?
'1','Joe','XXX','2011-03-01'
'1','Joe','XXX','2011-03-01'
'1','Joe','XXX','2011-02-26'
'2','James','ZZZ','2011-03-02'
'2','James','ZZZ','2011-03-08'
'2','James','ZZZ','2011-03-04'
'3','Raj','QQQ','2011-03-03'
'3','Raj','QQQ','2011-03-06'
'4','RO','WWW','2011-03-05'
'4','RO','WWW','2011-03-05'
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
March 9, 2011 at 7:23 am
Not sure if I'm following 100%... Just the dates from Table B? Dates and fetch the rest of the employee data from A? If so will there only be one...
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
March 9, 2011 at 7:18 am
*sigh* I know I'm a little short tempered due to lingering jetlag (first time I've still been struggling to sleep 3 days later), but I really didn't need three replies...
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
March 9, 2011 at 7:10 am
Viewing 15 posts - 27,466 through 27,480 (of 49,552 total)