Viewing 15 posts - 8,761 through 8,775 (of 18,926 total)
Good call... just make sure to put the waitfor at the top of the loop so that it does not affect the rowcount!... or save that value in a variable...
September 28, 2008 at 9:01 pm
Are those errors in the non clustered indexes or in the base table?
September 28, 2008 at 11:41 am
You don't need any cursor. Do a test on a smaller table to understand how it works.
Just use the script as I put it, it will delete all the...
September 28, 2008 at 11:15 am
One last idea that me be real fast and not cause any troubles.
Can you load all the new data into an exact copy of the base table, then in a...
September 28, 2008 at 8:44 am
The progressive delete is quite easy and often much faster than doing a single delete with millions of rows :
SET ROWCOUNT 10000
DELETE FROM dbo.Table WHERE WhatEver
WHILE @@RowCount = 10000
BEGIN
--make...
September 28, 2008 at 8:40 am
Create a reporting table.
Run a query daily to load the data into that reporting table.
Run your reports against that table with proper indexing and you should get very efficient queries.
September 27, 2008 at 3:29 pm
Make sure you have a backup nearby.
Run diagnostics on the DB to validate the integrity.
The 2 options I found to repair this problems are use a good backup to restore...
September 27, 2008 at 3:26 pm
One way to be sure about the hd fragmentation would be to drop the DB althogeter. Run defrag. Then recreate the DB file at their correct size. ...
September 26, 2008 at 8:31 pm
Here's another one Steve, it's at least the 10th time I see people asking for a way to see the last posts with the reply button... anyway to make those...
September 26, 2008 at 8:04 pm
In that case you don't really have a choice to do it the way you're doing it (or similar).
For the db fragmentation. Check the current DB size on the...
September 26, 2008 at 8:01 pm
Let me be the first to suggest you to save the execution plan in a .sql file, zip it and attach if to your post. Noone's going to read...
September 26, 2008 at 7:39 pm
The_SQL_DBA (9/26/2008)
September 26, 2008 at 7:36 pm
As a side note, isnumeric has many gotchas... those string are all considered valid numeric values :
'1'
'1.00'
'1E10'
You might consider using this if you need something that checks for IsAllNumbers...
September 26, 2008 at 4:38 pm
That's called short-circuiting. Sql server will stop evaluating the where condition(s) as soon as the whole statement cannot be true.
Run this and you will see what I mean. ...
September 26, 2008 at 4:32 pm
Viewing 15 posts - 8,761 through 8,775 (of 18,926 total)