Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add index to async_table to speed up lease deletions (#3235)
Lease deletions are done by executing the following sql statement: ```sql -- name: ReleaseLease :one DELETE FROM leases WHERE idempotency_key = $1 AND key = $2::lease_key RETURNING true ``` This table is referenced by `leases_id` in the `async_calls` table. So a deletion needs to lookup of such foreign key within the `async_calls` table in order to set the row's value to NULL. This PR adds an index to that foreign_key, so that deletions of leases can happen much much faster.
- Loading branch information