Hi All, The problem got resolved. The DBA could figure it out. It occured because of the locks on tableA. Some jobs were running in the background...
quote:Originally posted by Adriaan Do you have a maintenance job scheduled to optimize the indexes? Not very sure; but couldn't see any.
Ohh .. okay. Its just few months I have started with SQL server; so trying each and every that comes in mind; so thought of trying execution plan as...
Is this a parent table with cascade delete to other tables? - No. But similar kind of thing is handled through triggers. Does the table have...
quote:Originally posted by Madhivanan Run the profiler and see if there are any blocks How many rows do you expect to be deleted? If there are too...
I am not getting any error for this. The records are successfully getting inserted into the table through simple INSERT statement. But further...
My table already had few millions of records. Few thousand records have got inserted into this table during performance testing. Now, the table is...
Okay, Thanks everyone .. !
Ohh .. I mis-interpreted the error it seems :-(<br />You are right; this worked perfectly fine and I can see the performance improvement as well. The...
quote:Originally posted by Madhivanan Why didnt you use the method I suggested? Madhivanan Failing to plan is Planning to fail Can you please...
This is original code which is pretty slow - (specifically the INSERT statement)....
quote:Originally posted by DilliGrg quote:Originally posted by GRKool Here, table A is too large and INSERT is performed record by record; which...
quote:Originally posted by Madhivanan Dont use Cursor General Approach Update T set col=S.col from TargetTable T inner join SourceTable S on...
My code reads records from table A in a cursor one by one. Read record - @emp_id { If the record (@emp_id) exists in table B, Update the record with...
Separate names with a comma.