4

If I have a table that is getting bigger and bigger (i.e. it is taking more and more storage space - currently 65GB), can this affect the overall performance of the PostgreSQL server, e.g. impact the speed of queries on other tables?

This is for a PostgreSQL 9.6 database (we plan to upgrade to 10 -> 11 -> 12 later this year), hosted on Google Cloud (Cloud SQL for PostgreSQL).

2
  • 1
    At least with "vanilla" Postgres you can go directly from 9.6 to 12, no need for three different migrations. Jul 23 '20 at 7:02
  • Something you should consider as you migrate to the modern releases of postgres is table partitioning- postgresql.org/docs/12/ddl-partitioning.html . PG can handle very large tables just fine, but there are advantages to partitioning.
    – Freiheit
    Jul 23 '20 at 18:28
5

No, this shouldn't affect the speed of queries for other tables.

One way it could indirectly affect the speed is, if you regularly run queries against that big table and retrieve many rows from there (either directly or indirectly e.g. because of a Seq Scan). This could then cause data from other (smaller) tables to be evicted from the cache.

Then a query using one of the other tables needs to retrieve the data again from the hard disk which of course is slower than from cache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.