I have single insert statement
insert into mq_message (id, message, type, ..) values (...)
This statement is called in spring boot chat application each time message sent to chat channel. We already have many many chat channels and huge number of users.
How to improve its performance or is there any method so that spring data can batch these insert queries ??
Appreciate your help.
CodePudding user response:
Try to use the transaction (begin insert query and commit) Refer the scenario 3 of the given link
CodePudding user response:
Let's see SHOW CREATE TABLE mq_message
-- Getting rid of some redundant indexes will help a little.