PostgreSQL: DELETE vs. TRUNCATE
Data isn’t only about storage and accumulation – sometimes it’s also about deletion, cleanup and archiving. In SQL there’s more than one way to empty a table. Two essential methods are available: DELETE TRUNCATE DELETE vs. TRUNCATE Both commands serve totally different purposes, which are sometimes not fully understood. The key difference is that DELETE […]
PostgREST: Get started with automated PostgreSQL APIs
This blog introduces you to PostgREST and helps you to get started with it quickly. What is PostgREST? First think about this: a modern database application usually doesn’t connect to the database directly and issue arbitrary SQL commands. In general, there is always some kind of abstraction layer in between. This layer could be Hibernate […]
Stored procedures in PostgreSQL: getting started
Stored procedures are a core concept which can be found in most relational database systems. They have proven to be useful in many areas and have been widely adopted by developers and DBA’s alike. Stored procedures basics In PostgreSQL stored procedures have been around for a number of years. The syntax of this important command […]
PostgreSQL: Finding the current timestamp
PostgreSQL provides all kinds of time-related functions. But time is not as easy as it seems. One question many people keep asking: How can I find the current timestamp? What time is it? While this seems like an easy question the answer isn’t as clear-cut as you might expect. Basically, there are three functions we […]
Improving GROUP BY with CREATE STATISTICS
Analyzing time series often comes with challenges. This is especially true if you want to do a bit more than just run simple counts on values in a column. More often than not you’ll want to create a month’s report, a weekly overview and so on. This requires you to group on expressions rather than […]
JSON logs in PostgreSQL 15
As of version 15, PostgreSQL offers you the ability to write the server log in JSON format. This feature has been desired for a long time and has finally made it to PostgreSQL core. In this post we will discuss how JSON logs can be configured and what this brand new feature does for users. […]
Oracle to PostgreSQL migration cost assessment made easy
The CYBERTEC Migrator is a free tool that allows you to easily and quickly migrate from Oracle to PostgreSQL. The CYBERTEC Migrator container can be downloaded at no cost to you. It is a good way for people to move from Oracle to PostgreSQL as speedily as possible. And now, the latest release has a […]
Partition PostgreSQL: which partition did I INSERT my data into?
Partitioning is one of the most desired features of PostgreSQL, widely adopted by developers. This is not only true for in PostgreSQL 15, but also for older versions which did not provide as many features as the latest version of the database. That’s why you should know not only how to properly partition tables, but […]
PostgreSQL ERROR: permission denied for schema public
In PostgreSQL 15, a fundamental change took place which is relevant to every user who happens to work with permissions: The default permissions of the public schema have been modified. This is relevant because it might hurt you during application deployment. You need to be aware of how it may affect you. Creating users Many […]
btree vs. BRIN: 2 options for indexing in PostgreSQL data warehouses
Indexing is the key to good performance. However, people often ask: Is there an alternative to btree indexing? Can we make indexes in PostgreSQL smaller? Can we create indexes in PostgreSQL faster? And how can we index in a data warehouse? This blog will answer all those questions and show which options you have to […]
pgbouncer: Types of PostgreSQL connection pooling
pgbouncer is one of the most widely used tool for connection pooling. At CYBERTEC, we’ve successfully deployed it in many different situations. It has proven to be reliable as well as useful. Before we dive into different pooling modes and their implications, why do we need a connection pooler in the first place? The reason […]
VACUUM does not shrink my PostgreSQL table
Did you ever wonder why VACUUM does not make your PostgreSQL tables smaller? Did you ever wonder why VACUUM does not shrink data files? Well, maybe this is the article you have been looking for. The point is: usually, space is not returned to the operating system after a cleanup and it is important to […]