Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL server. How to DELETE 1 million rec?
Message
De
30/12/1999 18:00:08
 
 
À
30/12/1999 15:49:48
Oleg Khvalin
The Sutherland Group Ltd
Rochester, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00310564
Message ID:
00310723
Vues:
24
>>>>Oleg,
>>>>
>>>>Instead of deleting once every 2-3 weeks, you might consider defining a job on the server to delete your 'unused' rows everynight based on the appropriate conditions
>>>>
>>
>>>Mark,
>>>These records expire 3 month after their "mail" day and it means all 1 million rec (minus 10,000 that were used) expire at once.
>>
>>Is this a direct mail/mass market application? If so, you may consider a change in the data model that treats individual mailings as discreet entities within the database, in other words a single table (or collection of tables) for each mailing. By doing it this way, at the 90 day mark you would SELECT your used records into the approriate 'used records' table and then just DROP the original table.
>>
>>Mark
>
>Mark,
>You are right, there are several ways to avoid DELETE problem and your way is one of them. Again I am not looking for workarounds, I already know too many.

IMO: an alternative approach, not a workaround


>Forget my example, the question remains, how one deletes 1 mil records from SQL Server table? If it is "industrial strength" DB it should be relatively easy.
>Thanks,
>Oleg

Perhaps I misunderstood the the underlying reason for your post. I'm ASSUMING at this point that a simple -

DELETE FROM sometable WHERE somecondition

is not providing either a) the functionality you need, b) The performance you want, c) has some administrative overhead in terms of transaction logs etc that you dont want to deal with, or d) some combination of the above

If the DELETE FROM statement is causing problems, please elaborate. If I can't provide a meaningful response, maybe someone else can

Mark
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform