The author faced issues with slow queries and an increase in RDS sessions post-release.After debugging and examining the codebase, the author discovered the use of gap locks in InnoDB.Gap locks prevent other transactions from inserting a row into a specific range until the current transaction completes.Using an indexed column helps MySQL precisely lock the specific gap and prevent unnecessary blocking of other transactions.