|
-
May 1st, 2006, 02:23 PM
#2
Re: [02/03] How to make tons on insert statements more effecient?
Welcome to the forums. I have two suggestions, but they may not be ideal:
1) You can just open one connection, and leave it open for the duration. There is no need to close it, and that alone should speed up the processing. Just keep changing the command.CommandText to the new query, without ever closing the connection. I guess I'd have to see some code to make a verys specific suggestion there.
2) I'm not sure what the slowest part of the process is. You might benefit from a stored procedure handling the INSERT, but failing that, why not lump several INSERT statements together. Shoudl be able to separate them with commas. If you tested for five numbers, then lumped (up to) five INSERT statements together, that should speed things up some. Further improvements might be made along these lines, such as searching until five numbers need to be inserted, then inserting them. Etc.
My usual boring signature: Nothing
 
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
|