I know that to insert data in mysql, I can utilize 3 different methods for multiple entries, efficient one being:
INSERT INTO TABLE(
COLUMN1,
COLUMN2,
COLUMN3`) VALUES
('ID1', 'SAME TITLE', 'SAME MESSAGE'),
('ID2', 'SAME TITLE', 'SAME MESSAGE'),
('ID3', 'SAME TITLE', 'SAME MESSAGE'),
.......
('ID1000000', 'SAME TITLE', 'SAME MESSAGE');
But this query will also take a long time while my other queries will also be executing on the server, where some of my queries take 3-4 seconds to return data on a average online user base of 10000. So, is there a way to write a query in such a way that for all the rows, I don't need to pass the SAME TITLE and SAME MESSAGE and it only needs the array of user ids which I can send in chunks of suppose 10k or 20k at a time, which may reduce the overall data size sent to the RDS.
Please suggest. I may sound hypothetical, as I also have not seen such before, but looking for any optimization possibility to any extent.
You could try setting the default value of the title and message fields in the MYSQL table to what you want. You would then only have to insert the ID numbers. I've done that for things like user welcome messages. Not the easiest for maintaining but is probably the fastest.