You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were facing poor performances as long as the "fusio_log" table was growing (quickly as we are using HAProxy with a L7 check). The MariaDB "slow query" log showed that it was related to the rate limiting feature (SELECT COUNT(*) AS cnt FROM fusio_log WHERE ...).
According to those queries, we added 2 indexes on the "fusio_log" table :
ALTER TABLE `fusio`.`fusio_log` DROP INDEX `IDX_LOG_TID-IP-DATE`, ADD INDEX `IDX_LOG_TID-IP-DATE` (`tenant_id`, `ip`, `date`) USING BTREE;
ALTER TABLE `fusio`.`fusio_log` DROP INDEX `IDX_LOG_TID-UID-DATE`, ADD INDEX `IDX_LOG_TID-UID-DATE` (`tenant_id`, `user_id`, `date`) USING BTREE;
Time for request processing as seen in Fusio Apache logs (last column, in ms) before adding those indexes :
Hi @gpenin thanks for the feedback and this is indeed a good idea, I have just added a commit s. apioo/fusio-impl@15c10f3 to add those index for the next version
Hi,
We were facing poor performances as long as the "fusio_log" table was growing (quickly as we are using HAProxy with a L7 check). The MariaDB "slow query" log showed that it was related to the rate limiting feature (SELECT COUNT(*) AS cnt FROM fusio_log WHERE ...).
According to those queries, we added 2 indexes on the "fusio_log" table :
The "fusio_log" table contained ~250k lines during those measurements.
Maybe those indexes could be added upstream ?
Regards,
The text was updated successfully, but these errors were encountered: