---
title: "Considering combined vs separate indexes in Postgres"
publication: "Postgres Weekly"
issue: 316
published_at: "2019-07-31"
canonical_url: "https://postgresweekly.com/issues/316"
---

The latest Postgres news, articles, tools, and projects.       

#316 — July 31, 2019 

[Read on the Web](https://postgresweekly.com/issues/316)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/avzmg0sjxhowqtx5i0em.jpg)](https://www.percona.com/blog/2019/07/30/parallelism-in-postgresql/)   

[An Introduction to Parallelism in Postgres](https://www.percona.com/blog/2019/07/30/parallelism-in-postgresql/) — Some interesting digging into what _parallelism_ really means in modern versions of Postgres, including how parallel sequential scans, aggregations, and B-tree scans speed things up. 

Ibrar Ahmed   

[Combined Indexes vs. Separate Indexes](https://www.cybertec-postgresql.com/en/combined-indexes-vs-separate-indexes-in-postgresql/) — A common question when it comes to designing relational databases relates to when composite indexes (indexes that involve multiple columns) make more sense than single column indexes. Hans-Jürgen looks at some scenarios in Postgres. 

Hans-Jürgen Schönig   [![\](https://copm.s3.amazonaws.com/1c40fd85.png)](https://www.percona.com/blog/2019/05/24/an-overview-of-sharding-in-postgresql-and-how-it-relates-to-mongodbs/?utm_source=cooperpress&utm_medium=advertisement&utm_campaign=GLQ319COOPERPRESSDG&utm_term=postgresql&utm_content=postgresql-weekly) 

[An Overview of Sharding in PostgreSQL](https://www.percona.com/blog/2019/05/24/an-overview-of-sharding-in-postgresql-and-how-it-relates-to-mongodbs/?utm_source=cooperpress&utm_medium=advertisement&utm_campaign=GLQ319COOPERPRESSDG&utm_term=postgresql&utm_content=postgresql-weekly) — Learn about the new features in PostgreSQL that allow the deployment of simple shards. 

Percona sponsor   

[A Dive into PostgreSQL on AWS Aurora](https://severalnines.com/blog/cloud-vendor-deep-dive-postgresql-aws-aurora) — Amazon Aurora boasts PostgreSQL _compatibility_ but what does it really offer, how is it to use, and what are its limitations? Viorel Tabara takes a look. 

Severalnines   

[Is SQL on DNA The Next Frontier for Databases?](https://www.zdnet.com/article/forget-silicon-sql-on-dna-is-the-next-frontier-for-databases/) — An EU initiative funds far out technology ideas, one of which is the idea of storing data within synthesized DNA. It’s still expensive to do but progress has been made and there are academic papers and demos (based on Postgres) ready to go. 

George Anadiotis (ZDNet)   

[Comparing `jsquery` vs SQL/JSON for Querying JSON](https://thombrown.blogspot.com/2019/07/jsquery-vs-sqljson.html) — Native support for SQL/JSON is coming to Postgres 12 and will offer a standardized way to query JSON data stored within Postgres’s JSONB columns. `jsquery`, on the other hand, offered a similar query language in an extension from Postgres 9.4 onward. How do they compare? 

Thom Brown   

[Because Your Data Is Your Business](https://pgexperts.com) — PGX provides complete PostgreSQL support, from emergency services through daily operational support, to strategic planning. We’re here for your data ops. 

PostgreSQL Experts, Inc sponsor   

['Big Data' with Postgres and Apache Spark](https://severalnines.com/blog/big-data-postgresql-and-apache-spark) — Spark is a popular open source analytics engine for big data processing and if you’ve found it a little opaque till now, here’s the basic steps of getting it to interact with a Postgres database. 

Sebastian Insausti   

[Implementing Constraint Exclusion for Faster Query Performance](https://www.timescale.com/blog/implementing-constraint-exclusion-for-faster-query-performance/) — A look at how Timescale (who create a time-series focused extension for PostgreSQL) leveraged the foundation of PostgreSQL and extended its capabilities to improve performance. 

Sven Klemm   

[pglogical 2.2.2 Released](https://www.postgresql.org/about/news/1956/) — pglogical is an extension-based logical replication system that serves as an efficient alternative to physical replication. 

2ndQuadrant      supported by [![\](https://res.cloudinary.com/cpress/image/upload/v1549285104/cdttwslojuv9zso9nswk.png)](https://www.datadoghq.com/postgres-monitoring/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-PostgresWeeklyTip)  

💡 Tip of the Week 

A way to customize how NULL values are ordered
Kindly supplied by [Jonathan Reinink](https://reinink.ca/) via [Twitter](https://twitter.com/reinink/status/1155799117840490497) 

One of my favourite smaller features of PostgreSQL is ordering data with NULL values last (or first). You can simply add `NULLS LAST` or `NULLS FIRST` after the direction (`ASC`/`DESC`).  

![](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1564400143/bp6nlnrmv40c2h4uke4c.png)   

This allows you to always keep NULL values last, regardless of the direction you're sorting. 

The _Tip of the Week_ is sponsored by [Datadog](https://www.datadoghq.com/postgres-monitoring/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-PostgresWeeklyTip). Monitor your Postgres databases, cloud services, web servers, containers, and servlets all in one place with Datadog. [Try it free.](https://www.datadoghq.com/postgres-monitoring/?utm_source=Advertisement&utm_medium=CooperPress&utm_campaign=CooperPress-PostgresWeeklyTip)      

🗓 Upcoming Postgres Events 

- [PGConf.Brasil 2019](https://www.pgconf.com.br/2019/en/) (August 1-3 in São Paulo) — A three day conference with talks, tutorials, courses, and lightning talks.
- [PGDay Austria 2019](https://pgday.at/en/) (September 6 in Wiener Neustadt, Austria)
- [PostgreSQL Conference Asia 2019](http://2019.pgconf.asia/) (September 8-11 in Bali, Indonesia)
- [PostgresConf Silicon Valley 2019](https://postgresconf.org/conferences/SV2019) (September 18-20 in San Jose) — the schedule (including training) has now been published.
- [PostgresConf South Africa 2019](https://postgresconf.org/conferences/SouthAfrica2019) (October 8-9 in Johannesburg) — An opportunity for the database administration and developer community who use Postgres to get to know each other.          

Curated by [Cooperpress](https://cooperpress.com/), [Peter Cooper](https://twitter.com/peterc), and [Craig Kerstiens](https://twitter.com/craigkerstiens). 

[Change your email address](https://postgresweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://postgresweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
