Prae
Designing a business automated task and trying to optimize the queries performed to the database
in fact every 100 row i perform a savechanges, and we thought it was fine to send insert request for 100 rows at once.
It's not that critical so we didnt benchmark more...
10 replies
Designing a business automated task and trying to optimize the queries performed to the database
to be honest the 100 row number was determinated by my technichal lead.
It's a setting we'll be ready to adjust after we enter in production if we see any problem
10 replies
Designing a business automated task and trying to optimize the queries performed to the database
Hello guys,
I understand it was hard to give definitive answer.
"Could you load the entire file into a staging table, then execute batch operations on that?" => Yes, i load everything in memory and then loop over chunked arrays of 100 rows. For each chunk, i query everything i need for those 100 rows, and then i feed a dictionnary for each query i performed, using as key a value type (so a struct if multiple elements were involved) of what was used to filter the entities in my repository.
Then, i loop over the hundred rows and perform my task. I like the simplicity of use of dictionnaries to retrieve the datas I need for the current row, i didnt have to duplicate every conditions.
For example i had to search a list of customers based on a name, so in my cache i have a dictionary with the name as key and all the customers i had in db as value.
10 replies
is anyone using the interop library for converting doc to docx ..ur input much needed
try this "Start > Run > dcomcnfg (or “mmc -32″ and then add the Component Services snap-in manually if you can’t find the app under step 3)
Navigate to Component Services > Computers > My Computer > DCOM Config
Locate the MS application giving you trouble (eg: “Microsoft Excel Application” for Excel or “Microsoft Word 97 – 2003 Document” for Word)
Right click > Properties
On the security tab: Select Customize under Launch and Activation Permissions and click Edit…
Add the account under which the site is running (eg: Network Service) and assign Local Launch & Local Activation permissions
Voila!"
50 replies