Create indexes in Token table for 'expires' and 'type'

Description

Original message form customer:

(…) Since we activated the slow query log
a few days ago, we saw 4 recurring querries in the logs. Two of them
were on the tokens table. The first one was fetching the session tokens
and the second one checking expired tokens. Both toke 20-30 seconds.

We created this morning two additional indices on this table. The first
on the expires column, using btree, and the second one on the type
column, using hash.

Environment

None

Attachments

1

Activity

Show:

Krzysztof April 29, 2024 at 11:10 AM

QA:

  1. I’ve updated the docs (additional requirement for MySQL permissions)

  2. otherwise +1.

Roman Krysiński April 28, 2024 at 11:39 AM

RK QA: +1

Roman Krysiński April 21, 2024 at 1:38 PM

RK QA:

  1. postgress tested, application works as expected

  2. mysql 8.0 is not starting, I’m attaching the exception log, however the root cause:

docker-compose file to reproduce the problem:

unity configuration:

Done

Details

Assignee

Reporter

Fix versions

Priority

Created April 4, 2024 at 11:38 AM
Updated April 29, 2024 at 11:10 AM
Resolved April 29, 2024 at 11:10 AM