Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
In the database structured query language (SQL), the DELETE statement removes one or more records from a table.
0
votes
Accepted
Optimization: Delete with Top and minimize the where clause date range
You trade off
speed
smaller transaction log
concurrency
So running this in batches with a good index satisfies the last 2, but is slower. However, you don't need absolute speed if it is less intru …
42
votes
Accepted
Methods of speeding up a huge DELETE FROM <table> with no clauses
What you can do is batch deletes like this:
SELECT 'Starting' --sets @@ROWCOUNT
WHILE @@ROWCOUNT <> 0
DELETE TOP (xxx) MyTable
Where xxx is, say, 50000
A modification of this, if you want to remove … SELECT 'Starting' --sets @@ROWCOUNT
WHILE @@ROWCOUNT <> 0
DELETE TOP (xxx) MyTable WHERE ...
INSERT MyTable (col1, col2, ...)
SELECT col1, col2, ... FROM #Holdingtable …
10
votes
Safely deleting a SQL Server log file (.LDF)
If you delete the LDF (SQL Server shut down), your database comes back "suspect".
If you detach+delete, attach the MDF by itself, the LDF is re-created. …