5mins of Postgres E32: Benchmark and improve query network latency using tc, COPY and pipeline mode

Author: pganalyze
Published At: 2022-08-25T00:00:00
Length: 05:07

Summary

Description

Today, we're gonna talk about network latency, how it impacts your query performance and how to improve it by using pipeline mode or COPY in Postgres. We also take a look at traffic control with the Linux tc tool.

*Find the article on our blog here:*

https://pganalyze.com/blog/5mins-postgres-improve-query-network-latency-performance-pipeline-mode-copy-tc

*Learn more about pganalyze:*

https://pganalyze.com

https://pganalyze.com/newsletter

https://twitter.com/pganalyze/

*Check out the pganalyze library for eBooks, webinars, and more:*

https://pganalyze.com/resources

📑 *What we have discussed in this episode of 5mins of Postgres:*

*Adding latency: one step, two step, oops - by Lawrence Jones*

https://blog.lawrencejones.dev/latency/

*Lawrence Jones on Twitter*

https://twitter.com/lawrjones

*Linux traffic control*

https://en.wikipedia.org/wiki/Tc_(Linux)

*How to use \timing in postgres*

https://stackoverflow.com/questions/40593723/how-to-use-timing-in-postgres

*What does \timing measure? - PostgreSQL mailing list thread*

https://www.postgresql.org/message-id/flat/BANLkTik3BbtzMysOZq5S8s6oVtF_C-d58A%40mail.gmail.com#50cf43f5c84646c81481d8e960898494

*How does COPY work and why is it so much faster than INSERT?*

https://stackoverflow.com/questions/46715354/how-does-copy-work-and-why-is-it-so-much-faster-than-insert

*Pipeline mode on postgresql.org*

https://www.postgresql.org/docs/current/libpq-pipeline-mode.html

Translated At: 2025-07-06T04:29:53Z

Request translate (One translation is about 5 minutes)

Version 3 (stable)

Optimized for a single speaker. Suitable for knowledge sharing or teaching videos.

Recommended Videos