Open DeD1rk opened 1 year ago
Can we analyze some data from Postgres itself, for example with pg_stat_element? Might be better than just doing guesswork.
Sure, you can just open a shell into the postgres docker om staging. But it's not realy practical to try stuff out there. Easiest is probably to run pg locally and try out that way, of course with a big lot of fixtures
Our database currently has only the default indexes suggested by Django (on pk's and foreignkeys mainly). Perhaps adding some more indexes could help increase performance.
Particularly, the most obvious case where improving performance would be great is event registrations. This is just one example, and there are more cases where indexes may be helpful.
We currently have the following:
When determining the queue position of a registration, we make extensive use of the
date
anddate_cancelled
columns, so perhaps adding an index on those would cause a nice speedup.