Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
maifs
Yak Posting Veteran
57 Posts |
Posted - 2010-04-22 : 11:43:06
|
| hi..i have large amount of data in my db almost 999 tables and overall total size of db is 40GB.i want to delete almost 30GB records on the base of date criteria.some tables having relation with primary key and foreign key. so its impact can't be neglected. procedure mechanism should be as such that its performance should be maximum. it can be done within minimum time. |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-04-22 : 12:05:40
|
| 1 way is to change the foreign key for cascading actionEx: On Delete Cascade..So when u delete the primary key automatically child table records will be deleted. |
 |
|
|
maifs
Yak Posting Veteran
57 Posts |
Posted - 2010-04-22 : 12:55:29
|
| are you saying that should i make it dynamically ????how can i make it for each table within cusor? |
 |
|
|
maifs
Yak Posting Veteran
57 Posts |
Posted - 2010-04-22 : 13:01:48
|
| and i am using ms server2005 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-23 : 03:44:05
|
| Have you identified the tables from which data should be deleted?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|