---
title: "AWS Aurora offering ARM for a Postgres performance boost"
publication: "Postgres Weekly"
issue: 397
published_at: "2021-03-17"
canonical_url: "https://postgresweekly.com/issues/397"
---

Plus auto_explain overheads, Postgres data warehousing, and monitoring Postgres with Nagios and Checkmk. |        

#397 — March 17, 2021 

[Web Version](https://postgresweekly.com/issues/397)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/xkr5yf16lq768c9nf1nq.jpg)](https://www.cybertec-postgresql.com/en/traveling-salesman-problem-with-postgis-and-pgrouting/)  

[Tackling the Travelling Salesperson Problem with PostGIS and pgRouting](https://www.cybertec-postgresql.com/en/traveling-salesman-problem-with-postgis-and-pgrouting/) — The [Travelling Salesperson Problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem) is the problem of routing between a variety of points visiting each only once and in as short a distance as possible. This post tackles the problem in a PostGIS powered Postgres database using [pgRouting’s](https://pgrouting.org/) extensions. 

Florian Nadler   

[Amazon Makes ARM-Based Instances Generally Available for Aurora](https://aws.amazon.com/about-aws/whats-new/2021/03/achieve-up-to-35-percent-better-price-performance-with-amazon-aurora-using-new-graviton2-instances/) — AWS Graviton2 processors are ARM-based CPUs that are custom built by AWS themselves and seem to offer much improved performance at a lower cost (a la Apple and their new M1 chips). This announcement brings the perf and cost improvements to Amazon Aurora PostgreSQL (and MySQL) users. 

Amazon Web Services   [![\](https://copm.s3.amazonaws.com/0e96536e.png)](https://pganalyze.com/ebooks/efficient-search-in-rails-with-postgres?utm_source=PostgresWeeklyPrimary03172021) 

[Free eBook: Efficient Search in Rails with Postgres](https://pganalyze.com/ebooks/efficient-search-in-rails-with-postgres?utm_source=PostgresWeeklyPrimary03172021) — Speed up a search query from seconds to milliseconds and learn about exact matches, trigrams, ILIKE, and full-text search. 

pganalyze sponsor   

[Can `auto_explain` (with Timing) Have Low Overhead?](https://www.pgmustard.com/blog/auto-explain-overhead-with-timing) — [auto_explain](https://www.postgresql.org/docs/current/auto-explain.html) is a Postgres module for logging execution plans of slow running queries - it has some overhead though, but is it _that_ big a deal and can it be mitigated? 

Michael Christofides   

[Building a Postgres-Backed “Data Lake” for Reporting Purposes](https://tech.fretlink.com/build-your-own-data-lake-for-reporting-purposes/) — Most companies make data driven decisions and querying data warehouses (or ‘lakes’, when the data is less formally structured) is a common activity. This extensive tale covers how one company approached it using Postgres and FDWs in an intriguing manner. 

Paul Bonaud   

[Basic Practices for Optimizing Postgres Read and Write Performance](https://vettabase.com/blog/optimize-read-and-write-performance-in-postgresql/) — Some basic techniques and speed optimization ‘rules’ to take into account. 

Michael Aboagye   

[Running Postgres in Docker - Why and How?](https://www.cybertec-postgresql.com/en/running-postgres-in-docker-why-and-how/) — An introduction to Docker and whether you should run production Postgres workloads in a docker container. 

Kaarel Moppel   

[Scaling Out Postgres with the Citus Open Source Shard Rebalancer](https://www.citusdata.com/blog/2021/03/13/scaling-out-postgres-with-citus-open-source-shard-rebalancer/) — Last week’s [Citus 10](https://www.citusdata.com/blog/2021/03/05/citus-10-release-open-source-rebalancer-and-columnar-for-postgres/) release included the open sourcing of its _shard rebalancer_, a key part of how Citus optimizes tables split/sharded across different nodes. 

Jelte Fennema   

[Performance Differences Between Postgres and MySQL](https://blog.arctype.com/performance-difference-between-postgresql-and-mysql/) 

Blessing Krofegha   

[Tuning Your Postgres Database for High Write Loads](https://blog.crunchydata.com/blog/tuning-your-postgres-database-for-high-write-loads) 

Tom Swartz    

🔧**Tools and Code**   

[PgHero 2.8: A Performance Dashboard for Postgres](https://github.com/ankane/pghero) — A dashboard built in Ruby (and used at Instacart) that lets you look at basic performance stats including live queries, maintenance status, and connections. 

Andrew Kane   

[Monitoring Postgres with Nagios and Checkmk](https://www.highgo.ca/2021/03/15/monitoring-postgresql-with-nagios-and-checkmk/) — A RHEL/CentOS focused tutorial but it’s a neat setup. [Checkmk](https://checkmk.com/) is a tool that sits above Nagios and provides an arguably nicer interface. 

Hamid Akhtar   

[Build Internal Apps (Faster) on Top of Postgres](https://retool.com/?ref=cooperpress) — Build internal apps without the mundane, boring bits (wrestling with UI libraries or hacking together data sources & APIs). 

Retool sponsor   

[SQLBoiler 4.5: Generate a Go ORM Tailored to Your Database Schema](https://github.com/volatiletech/sqlboiler) — The idea is that you create your schema at the database level first and then this interrogates the schema and generates ORM code for Go based upon the actual design. 

Volatile Technologies Inc.   

[Orafce 3.15.0 Released: Postgres Implementations of Oracle Database Functions](http://okbob.blogspot.com/2021/03/new-release-3150-of-orafce-extension.html) 

Pavel Stěhule      supported by [![Cockroach Labs\](https://res.cloudinary.com/cpress/image/upload/v1615811307/zp1sb3x4rkaxsjs1q6cl.png)](https://www.cockroachlabs.com/?utm_source=cooperpress&utm_medium=sponsor&utm_campaign=tipoftheweek&utm_content=postgresweekly-primary&utm_term=postgres-weekly-0317)  

💡**Tip of the Week** 

How to auto generate UUID columns when creating mapping classes with SQLAlchemy 

For Python developers using the [SQLAlchemy ORM framework,](https://www.sqlalchemy.org/) you can let the database server auto-generate UUID columns when creating mapping classes. 

This is valuable since it saves you from needing to use application libraries. Use the `server_default` parameter and call the `gen_random_uuid()` function:  

class Account(Base):
 """The Account class corresponds to the "accounts" database table.
 """
 __tablename__ = 'accounts'
 id = Column(UUIDtype, server_default=text("gen_random_uuid()", primary_key=True)
 balance = Column(Integer)   

The `Column.server_default` [parameter](https://docs.sqlalchemy.org/en/13/core/defaults.html#server-invoked-ddl-explicit-default-expressions) can be used to call any database function for setting a default value of a column. 

This week’s tip is sponsored by [Cockroach Labs](https://www.cockroachlabs.com/?utm_source=cooperpress&utm_medium=sponsor&utm_campaign=tipoftheweek&utm_content=postgresweekly-primary&utm_term=postgres-weekly-0317), Learn about CockroachDB in this demo: "[Distributed SQL: A modern, cloud-native PostgreSQL](https://www.cockroachlabs.com/webinars/distributed-sql-a-modern-cloud-native-postgresql-thank-you?utm_source=cooperpress&utm_medium=sponsor&utm_campaign=tipoftheweek&utm_content=postgresweekly-primary&utm_term=postgres-weekly-0317)".     

**Got a new email?** You can [change your address here](https://postgresweekly.com/edit_subscription/*|UID|*). 

--- 

**Bored of us?** [Click here to stop getting Postgres Weekly](https://postgresweekly.com/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. Thanks! 

--- 

**Want more?** You might like [DB Weekly](https://dbweekly.com/?utm_source=pg&utm_medium=email&utm_campaign=footer-promo), our more general database newsletter covering data storage trends, new database types, and more. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada. 

[Stop getting this newsletter.](https://postgresweekly.com/leave/*|UID|*)
