Subject | How To Speed Up Update SQL |
---|---|
Author | Vishal Tiwari |
Post date | 2015-10-14T09:21:44Z |
Hi All,
I have 480 Update SQL statements which I am executing using ADScript component in Delphi 2010.
Update SQL updates data in only one table called MY_BOOK, but there is a join with MY_BOOK_HEADER table. Below is the Update SQL, which is taking 81 seconds to execute all 480 Update SQL statements. Any idea how could I improve the speed of these 480 Update SQL statements ?
Update SQL:
Update MY_BOOK MB SET BOOK_NAME = 'Book Name1' , BOOK_DESCRIPTION = 'Book Desfcription1'
Where MB.BOOK_TYPE = 4 And
Exists (Select 1 from MY_BOOK_HEADER MBH
Where
Upper(Trim(MBH.HEADER_BOOK_CODE)) = Upper(Trim('127518010109038'))
And MBH.FK_BOOK_GROUP = '{79B79C33-CE56-4084-912B-6DD9F70B3DC4}'
And MBH.PK_BOOK_HEADER = MB.SK_BOOK_HEADER
);
Thanks In Advance.
With Best Regards.
Vishal