Closed davidemarrone closed 3 months ago
Since the code only checks if the return value is different from zero, it should be sufficient to replace it with select 1 as msg_id
. In any case, if there is a problem with the insert, the stored procedure will throw an exception. What do you think?
The stored procedure
Tig_OfflineMessages_AddMessage
is usingSELECT LAST_INSERT_ID() AS msg_id;
which causes a performance issue. For example, on Aurora RDS, this command leads to a significant amount of "wait/io/redo_log_flush". Would it be possible to eliminate this call and check in another way if the message was successfully inserted into the table?