Viewing 15 posts - 46,471 through 46,485 (of 49,552 total)
Indeed. Is most intriguing...
Personally, I'm thinking that an instead of trigger might be a better idea, as it allows the insert to not actually be run, removing the need...
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
May 20, 2008 at 11:44 am
TheSQLGuru (5/20/2008)
Fixing poorly written queries and finding indexing opportunities will almost certainly provide WAY more benefit than worrying about how many files to use in a file group. 🙂
QFT.
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
May 20, 2008 at 11:37 am
Altering a procedure automatically invalidates its cached plan.
Check to make sure you don't have 2 versions, one in the dbo schema and one in a different schema
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
May 20, 2008 at 11:36 am
Methinks you're going too complex
CREATE TABLE #tempFileName (
FileNumber INT IDENTITY,
FileName varchar(50)
)
INSERT INTO #TempFileName (FileName)
SELECT DISTINCT Filename FROM #Temp
UPDATE #Temp
SET FileNumber = #tempFileName.FileNumber
FROM #tempFileName WHERE #tempFileName.FileName =...
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
May 20, 2008 at 11:31 am
Johann, have you come right?
If not, please post some code that reproduces the problem (complete with table creation script and inserts for sample data) and I'll see if 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
May 20, 2008 at 8:16 am
In SQL Server, unless you specify an order by, the order of rows returned is not guaranteed. You've just been lucky up until now.
I would suggest, any time you need...
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
May 20, 2008 at 7:50 am
There's an excellent article by Jeff Moden on running totals. You'll find it in the articles section here.
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
May 20, 2008 at 7:31 am
Actually, I just noticed this little gem...
ALTER TRIGGER [dbo].[trg_UpdateProcessedData]
ON [dbo].[ProcessedData]
AFTER INSERT
....
DELETE ProcessedData
WHERE HistoryID IN (SELECT...
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
May 20, 2008 at 7:27 am
Are you using a maintenance plan? I beleive in a maint plan you can specify system databases only, user databases only or all databases.
If it's set to all, is 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
May 20, 2008 at 7:22 am
It shouldn't. Rownumber starts at 1, regardless of how many times you run it. It's the row numbers for the current query, nothing more. Each time the partition columns changes...
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
May 20, 2008 at 7:13 am
Sandy (5/20/2008)
I also wants to learn Sql server 2005.......:hehe:..lolz
Cheers!
Sandy.
Books Online is a good place to start.
Johann, I could probably shave a couple more seconds off with proper indexing. In case...
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
May 20, 2008 at 6:24 am
ROW_Number is a built-in ranking function that's new in SQL 2005.
the order by clause in it specifies which column or columns define the order for the row number
The partition...
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
May 20, 2008 at 6:08 am
Do the tables BIS.History, BIS.[999] and ProcessedData all exist?
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
May 20, 2008 at 6:04 am
Put useful indexes on the table and remove the functions in the where clause.
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
May 20, 2008 at 5:59 am
Sweet. Then this should do the update for you
UPDATE #temp SET [Order] = TheOrder
FROM (SELECT ID, ROW_NUMBER() OVER (PARTITION BY projectID, langCode ORDER BY projectID, langCode) AS TheOrder
FROM #temp) Sub...
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
May 20, 2008 at 5:57 am
Viewing 15 posts - 46,471 through 46,485 (of 49,552 total)