DBA

Top 10 Configuration Parameters to Tune PostgreSQL for Better Performance

The conventional wisdom is that, if you do not know what you are doing, you’re better off using the default configuration. Databases usually perform well with the default parameter values and premature performance optimisation often results in worse performance. On the other hand, Postgres is a different story. Postgres default …

DBA

How To Create Users and Grant Privileges in MySQL

Managing user access in MySQL is similar to Postgres (see Postgres user creation here). You can either manage the access privileges through roles or give privileges directly to users. This post is a quick reference for granting privileges to users. Let’s have a look at a simple use case. We …

DBA

Index JSON In Postgres

To maximise query efficiency for a relational database is to index the columns that are often used for joining or conditions. The awesome thing about querying JSON in Postgres is that you can index it to further optimise query performance. In the previous post, we had a look at the …

DBA

How Postgres JSON Query Handles Missing Key

When we transform JSON to a structured format with a programming language in JSON data ingestion, we have to handle missing key. This is because JSON is schema-less and it doesn’t always have the same keys in all records as opposed to relational database tables. In Python, the missing key …

DBA

How To Format Output in Pretty JSON With Postgres

In the previous post, we discussed the new JSON ingestion strategy by using the power of Postgres native JSON support functionality (New JSON Data Ingestion Strategy By Using the Power of Postgres). Since Postgres 9.5, it’s got a cool function jsonb_pretty() which automatically formats the output in the pretty JSON …

DBA

How To Create User Credentials And Grant Privileges In Postgres

Creating user credentials and grand privileges in Postgres can be tricky. You have to make sure each user has the right access level to the right tables and schemas. Each database works differently even they all are relational databases. Postgres has its own way of creating users and granting privileges. …