-
April 26th, 2005, 08:38 AM
#1
Help me to improve me the performance
i am having one requirement in which lacks of records will be inserted into a table from a button click event in
an aspx page.the logic goes like this. it contains 4 for loops checking for array of records whether selected
( from a chkboxlist). for every selection it checks for the other array and if yes it inserts. likewise it goes for all the
checkbox array and henck this many records. what i did was , i wrote insert statement for each row
and so its taking **** a lot of time to get insert. everything is inserted in a single table.
How to increase the performance. is it possible to avoid this usinf sp. if yes is it possible to
pass an array as a parameter to the sp.pls help me.
thanks in advance
Vinoth
-
April 26th, 2005, 10:50 AM
#2
Re: Help me to improve me the performance
Well, one option may be to batch insert (seperating multiple commands via semicolon). I have a feeling though the insert isn't your problem (unless you're creating multiple connections per insert set) but rather the algorithm you're using to determine the presence of data. If you post code with a little better explanation of exactly what happens, we may be able to help futher.
-
April 30th, 2005, 02:37 AM
#3
Re: Help me to improve me the performance
hi,
thanks for ur reply. it seems there's no problem in the looping( the logic) b'coz its necessary to iterate for that many records(aprox 2 lacs) and i need to insert into the table.i was asked not to change the table structure and need to optimize it.i've tried it with the sp in sqlserver and need to test the performance.Any sugestions welcomed. once again thanks.
vinoth
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|