Hi all,
I have a table which contain 60 colums and appropriate clustered and non clustered index and 50 lacs data. Now i want to move some useless data into any other table. when i insert in other table it takes 5 to 7 minuts per 10 lacs data. now when in delete this data from main table it takes around 40 or more than 40 minuts. Please advice me how to reduce this.
urgent for me.
I am deleting data according to date means datewise.
Please help.
Loading

Iftikar HussainPosted Jul 12, 2013, 8:12 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 12, 2013, 8:00 AM
Iftikar HussainPosted Jul 12, 2013, 7:18 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 12, 2013, 7:12 AM
Iftikar HussainPosted Jul 11, 2013, 12:10 PM
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 5:24 AM
in this situation???
Iftikar HussainPosted Jul 11, 2013, 4:56 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 4:20 AM
i got a solution.
1. First of all I created a table tempPUT from wms_loose_transaction
2. After that I created a table tempDSP from wms_loose_transaction
3.truncate table wms_loose_transaction
4.insert into wms_loose_transaction select * from tempPUT
I have done above task within 5 minut. Please suggest me following process is right or
any error occur in future or any accuracy problem will happen???
Iftikar HussainPosted Jul 11, 2013, 2:33 AM
http://stackoverflow.com/questions/478327/multi-rows-deletion-from-table-in-sql-server
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 2:21 AM
It takes 6 minuts to delete 10k records
Iftikar HussainPosted Jul 11, 2013, 2:11 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 1:59 AM
It returns 2 lacs row
But It returns 0 rows
y???
Ravi ShekharPosted Jul 11, 2013, 1:59 AM
It returns 2 lacs row
But It returns 0
y???
Iftikar HussainPosted Jul 11, 2013, 1:52 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 1:41 AM
please find the attachment.
Iftikar HussainPosted Jul 11, 2013, 1:26 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 11, 2013, 12:37 AM
I already shrinked my log file but. still taking time. I am really in trouble.
I have to control 5 databases at 5 different location.and they all having same problem.
Please help me anyone.
Iftikar HussainPosted Jul 11, 2013, 12:26 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 11:49 PM
Iftikar HussainPosted Jul 10, 2013, 8:32 AM
select count(*) from wms_loose_transaction
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 7:23 AM
Iftikar HussainPosted Jul 10, 2013, 6:28 AM
have you tried this
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 6:05 AM
Kunal VaishyaPosted Jul 10, 2013, 5:58 AM
Refer link
http://msdn.microsoft.com/en-us/library/ms188232(v=sql.105).aspx
Iftikar HussainPosted Jul 10, 2013, 5:53 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 5:22 AM
Log file size is 4.41 gb and mdf size is 11.3 gb.
Iftikar HussainPosted Jul 10, 2013, 5:02 AM
also check your sql log file size
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 4:57 AM
Iftikar HussainPosted Jul 10, 2013, 4:44 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 4:41 AM
Kunal VaishyaPosted Jul 10, 2013, 4:33 AM
Delete from wms_loose_transaction
Iftikar HussainPosted Jul 10, 2013, 3:57 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 3:52 AM
this query....
Iftikar HussainPosted Jul 10, 2013, 3:52 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 3:26 AM
Iftikar HussainPosted Jul 10, 2013, 3:12 AM
Regards,
Iftikar
Ravi ShekharPosted Jul 10, 2013, 2:55 AM
Iftikar HussainPosted Jul 10, 2013, 2:52 AM
Please provide your sql query and table schema.
Regards,
Iftikar