Open MarioBassem opened 1 year ago
I noticed that our processor DB didn't use indexes at all. It is crucial to add database indexes to the entity fields on which one expects filtering and ordering. I would look first into adding indexes to our schema as the lack of indices is the most common cause of slow API queries.
currently, querying simple information from the postgres db requires multiple table joins, expensive calculations and have really bad performance. Hence, some data denormalization is needed, and if possible, doing the required calculations on the fly as events are reported.