I have been working through a high-performance application where I have identified a bottleneck. The bottleneck is actually when the application must insert messages from a socket, it will record them in a database. The trouble is the speed at which the messages come through are so fast that the application cannot catch up due to poor architectural planning. Clearly, insertion needs to be improved.
So here's the question: What is the most optimal format for performing inserts of individual records?
I have looked over at this link on high performance inserts revision 4 and found that doing something of this nature would require an extensive restructure in the application compared to its current attempt at concatenating a string together such as this:
INSERT INTO table (col1,col2,col3) VALUES (val1,val2,val3),(val4,val5,val6),(val7,val8,val9)
Does anybody have any have an insight over which is better, datatable insertion vs string concatenation?