An Introduction to Hypothetical Indexes — Why would you want to create imaginary indexes for Postgres’s optimizer to chew over? It’s a way to find out if an index would be useful before you go to the computational and storage expense of creating a real one.
Avinash Vallarapu
|
Demo: What Scaling Out Postgres Can Do for Your Analytics — Short 4 minute video showing how analytics pipelines benefit from scaling out Postgres horizontally & parallelizing your workload, using a 10-node Hyperscale (Citus) database cluster on Azure Database for PostgreSQL, with 320 cores & 2.5 TB of memory.
CITUS DATA, NOW PART OF MICROSOFT
|
PDF 📄 The Major Features in Postgres 12 — The much esteemed Postgres expert Bruce Momijan has released a simple slidedeck highlighting the most significant improvements and features coming to PostgreSQL 12, including JIT compilation and REINDEX CONCURRENTLY . It’ll only take you a minute to scan.
Bruce Momijan
|
supported by
💡 Tip of the Week
The modern alternative to SERIAL columns
When used in a table definition (e.g. with CREATE TABLE ), SERIAL is not a data type but provides a convenient way to generate an integer sequence and associate it with a column in that table.
|
CREATE TABLE people (
id SERIAL PRIMARY KEY,
name text
);
|
SERIAL continues to work fine, but since Postgres 10 we've been provided with a more SQL standards-compliant way of reaching the same outcome:
|
CREATE TABLE people (
id INT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
name text
);
|
It's more verbose, but has better inter-database compatibility, you get to specify your preferred type, and you no longer need to work out the name of the associated sequence if you want to work with it at all (such as to set unique permissions on the sequence).
For example, let's say you wanted to set a new start value for the sequence, you can now do:
|
ALTER TABLE people6 ALTER COLUMN id RESTART WITH 10;
|
There's more information on this whole topic here, including how to 'upgrade' your existing tables to using generated columns instead of SERIAL .
This week's tip is sponsored by Percona. Build an enterprise-grade PostgreSQL environment using various open source tools and extensions. Topics covered: security, backup, HA, connection pooling & load balancing, extensions, and detailed logging.
|
|
🗓 Upcoming Postgres Events
-
Postgres Vision 2019 (June 24-26 in Boston, MA) — Sir Tim Berners-Lee, the inventor of the Web, is delivering the keynote.
-
PostgresLondon 2019 (July 2-3 in London, UK)
-
PostgresConf Beijing 2019 (July 3-6 in Beijing, China)
-
PGConf.Brasil 2019 (August 1-3 in São Paulo) — A three day PG conference with talks, tutorials, courses, Couch Clinic, and lightning talks.
-
PGDay Austria 2019 (September 6 in Wiener Neustadt, Austria)
|
|
|