Photo by Kyle Petzer on Unsplash

Postgres UNNEST cheat sheet for bulk operations

Forbes Lindesay

--

originally posted on the @databases blog

Postgres is normally very fast, but it can become slow (or even fail completely), if you have too many parameters in your queries. When it comes to operating on data in bulk, UNNEST is the only way to achieve fast, reliable queries. This post has examples for using UNNEST to do all types of bulk transactions.

--

--

Forbes Lindesay

JavaScript enthusiast and maintainer of many open source projects.