Slow query in postgres

some issue are too slow in sentry dashboard. i inspect the clickhouse. but there was no problem. so i guess postgres is the troublemaker of slow response. so i want to improve the performance of the postgres.
i guess there are some triggers that can cause slow slow queries.

  1. there are so many dml(create, update, delete) so it can block the read queries
  2. if the postgres connection is lack of local memory, it can cause a lack of memory size for hash or join etc. so it can make many disk IOs that makes slow queries

is there any reason that you think is the problem of slow queries?

if i distributed CRUD queries from one postgres node to many nodes, it means sharding or make use of read replication, then can i improve the query speed?

I’m not sure if this is the best place to look for Postgres optimization/scaling advice as each setup would be unique. There are many good resources on the internet to help see slow queries and how to improve them.

thanks for your advice. i’d better searching the internet to scale out postgres.
but do you agree that postgres is the troublemaker of slow response?

I cannot really comment with this much information.