Drastic performance impact in the UI after migrating to PSQL
We recently migrated from Mysql 8 to Postgres 17, and our Filament UI has slowed down diabolically.
Some Form pages take up to 12 seconds to load which is just insane. The table pages are 2-4 seconds.
Even with Mysql it wasn't that great but now after the migration it's practically unusable.
I have gone through all the typical scenarios from Github issues and alike and tried everything with caching. I've ruled out the database itself did loads of benchmarks and everything and our API is unaffected. So it seems to come down to Filament itself.
Our form pages are quite big. We're using Filament as a content builder so each form page has 30-40 Builder Blocks among other things. 2-5 relation managers as well.
It's running on a very beefy server on hetzner which is pretty much cold.
I seriously have no idea what to look at anymore. Does anyone have any pointers in the right direction?
4 Replies
This is locally, on the server this takes 12 seconds

532 queries, I think you have to optimise something 😅
I never have issue on postgresql even with big databases. Just good indexes, good queries and sometimes partitions.
Could you share some queries and your associated edit form ?
n+1 with missing indexes would be my first suspects