DDL statements VERY poor performance

Category: azure database for postgresql


Nordberg on Sun, 08 Oct 2017 18:56:47

We have been trying to do alot of DevOps automation using Azure PostgreSQL, but running DDL statements is so slow, that it is impossible to use in practice.

Here is a few examples:

1. 1 x "CREATE DATABASE" statement between 58 and 62 seconds

2. Script with 6x "CREATE SCHEMA", 2x "CREATE EXTENSION" and 60x "CREATE TABLE" statements between 110 and 180 seconds

Comparad to On-premise, PostgreSQL on and Azure VM or PostgreSQL managed service on a 3rd party provider hosted in Azure.

#1 is less than a second and #2 is between 2 and 5 seconds.

We want to create database as part of our automated integration testing, but running initialization scripts (DDL) and the actual tests (DML) takes 42 minutes, compared to 1 minute in all the other scenarios mentioned above.

The Azure PostgreSQL tests were made on both Basic and Standard tier Azure Database for PostgreSQL instances, located in Azure Europe West region with almost similar run durations.

Is this normal? - we used all the default configuration settings.