
PostgreSQL: Sequences vs. Invoice numbers
What's the problem with using PostgreSQL database side sequences to create unique invoice numbers to send to clients? Let's find out.
345 articles on Databases.

What's the problem with using PostgreSQL database side sequences to create unique invoice numbers to send to clients? Let's find out.

Joins: Learn how to use an inner join and an outer join in PostgreSQL today by reading our tutorial. Also covers semi and full joins.

This fifth and final part of our blog series exploring Git’s internals shows several strategies for scaling your Git repositories that match related database sharding techniques.

We’re examining Git’s internals to help make your engineering system more efficient. This post views Git as a distributed database and looks into its synchronization techniques, specifically ‘git fetch’ and ‘git push’.

Git’s file history queries use specialized algorithms that are tailored to common developer behavior. Level up your history spelunking skills by learning how different history modes behave and which ones to use when you need them.

This post explores Git commit history as a database where ‘git log’ is the query language. Learn about Git’s custom query index – the commit-graph file – and how to make sure it’s enabled in your repositories.

This blog series will examine Git’s internals to help make your engineering system more efficient. Part I discusses how Git stores its data in packfiles using custom compression techniques.

Enforcing stricter performance isolation across neighboring tenants who rely on our storage infrastructure

Aliases are mandatory for sub-SELECTS by SQL standard. Some vendors (Oracle) don't force that rule. Will PostgreSQL follow it in the future?

In this article, the first part of “Databases for Front-end Developers” series, Atila Fassina helps you understand the concepts behind database architecture in order to use them reliably and sheds some light on serverless databases.

New syntax for SQL functions was introduced in PostgreSQL v14, this article gives you vital tips for this important change & its advantages.

Learn how to address the issue of bonus programs in SQL, improve your understanding of PostgreSQL, and calculate bonus points efficiently

This article shows how surprising transaction anomalies can happen with SELECT FOR UPDATE and what you can to to avoid them.

How the Database team uses Cloudflare Tunnels internally to improve security and usability of adhoc DB queries

We discuss the options for case-insensitive comparison and pattern matching in PostgreSQL, comparing the performance of different approaches.

Who's Hiring? * Close is building the sales communication platform of the future and we're looking for a Site Reliability Engineer to help us accomplish that goal. If you have a passion for databases (both SQL and NoSQL), significant experience building, managing, and monitoring infrastructure, databases, and backend services at scale and want to work with a rag-tag team of hardworking, but humble

Jamstack has surged in popularity over the past few years as an approach to building websites. As developers are building Jamstack sites, finding a well-integrated method to interact with a database can be a major stumbling block. In this article, Sam Poder explores how Prisma integrates with the Jamstack and why it’s a great solution for Serverless databases in JavaScript or TypeScript-based proj

How view permissions are checked, and how that changes if you use the security_invoker view option from PostgreSQL v15. Use row-level security effectively.

This article describes how to cancel queries in PostgreSQL and shows a trick that you can use if canceling a query doesn't work.

sqlite-utils: a nice way to import data into SQLite for analysis

Today, we’re excited to announce D1, Cloudflare’s first SQL database, designed for Cloudflare Workers

Time zone management and timestamp data types in PostgreSQL - learn how to use 'timestamp with time zone' correctly and optimize performance.

Who's Hiring? * Close is building the sales communication platform of the future and we're looking for a Site Reliability Engineer to help us accomplish that goal. If you have a passion for databases (both SQL and NoSQL), significant experience building, managing, and monitoring infrastructure, databases, and backend services at scale and want to work with a rag-tag team of hardworking, but humble

Merge - UPDATED 2023 - a technical preview of how to merge lists with ease. Find out about a wonderful command - add power to your PostgreSQL.

Learn how to use DROP ROLE and DROP USER in PostgreSQL. This article explains how to remove users and gives troubleshooting tips.

Over the past few weeks, we have experienced multiple incidents due to the health of our database. We wanted to share what we know about these incidents while our team continues to address them.

According to a recent Thoughtworks radar, “the industry is increasingly gaining experience with platform engineering product teams that create and support internal platforms.” They caveated this with a piece of advice: “When creating a platform, it’s critical to have clearly defined customers and products that will benefit from it rather than building in a vacuum.”…

Find out how to monitor PostgreSQL databases on Google Cloud with the pgwatch2 monitoring solution to get extended metrics for added clarity!

Data normalization - Learn how to apply the theory from part 1 of Michał Małecki's blog to real life with practical examples.

Learn how the Database Platform team performed the most recent MySQL upgrade at Shopify and how this changed our upgrade guidelines moving forward.

Customers can connect to a Postgres or MySQL database directly from their Workers using a Cloudflare Tunnel today. In the future, you can use Database Connectors to achieve this natively using a standardized Socket API.

With built-in global deployments, insane scalability and the flexibility of JavaScript, more and more applications are choosing to build on our global platform.

An overview of how we investigated and solved the issue of some Kubernetes Pods running MySQL starting up and shutting down slower than other similar Pods with the same data set.

This article describes how cursors and transactions interact, how WITH HOLD can overcome the limitations, plus some caveats and tricks.

Importing OpenStreetMap data into PostGIS is time-consuming. Download OpenStreetMap offers two dataset types periodically served as sql dumps.

How you can end up with gaps in sequences & how they can even skip backwards. How to build a gapless sequence in PostgreSQL.

This article describes what can go wrong when using the much-loved JSON capabilities of PostgreSQL and gives guidelines how to do it right.

This post explains how we’re able to balance our MySQL shards by migrating shops across shards—entirely online and with virtually zero consumer-facing downtime.

Oracle to PostgreSQL migration - Lessons learned in building a migration tool. How to avoid errors, null bytes and broken content.

We built a custom write-through cache for the Shop app's home feed that reduced database load by 15% and overall app latency by about 20%.

This article describes how PostgreSQL v14 reduces B-tree index bloat with "bottom-up index tuple deletion". A test case shows the difference.

There are plenty of interactive ways to learn new web development skills. We learn better by playing games. So we’ve collected interactive coding tools and games to help you learn CSS, JavaScript, SQL, React, Vim, regular expressions, Jamstack and pretty much everything in-between. Louis shares a comprehensive, categorized list of such tools covering a variety of different development technologies

By using PostgREST with Postgres, we can build REST API-based applications. In particular, it's an excellent fit for Cloudflare Workers, our serverless function platform. Workers is a great place to build REST APIs.

At Cloudflare, we have a great product called Workers KV which is a key-value storage layer that replicates globally. It can handle millions of keys, each of

zheap has been designed as a new storage engine to handle UPDATE in PostgreSQL more efficiently. Read about the current status and more.

Most of us grumble when running across a frustrating UX experience online (like not being able to complete a transaction because of a misplaced button). We

The LIMIT/OFFSET clause is off standard and thus not portable. Read about the proper way to handle it by using “SELECT … FETCH FIRST ROWS”.

How to simulate unsupported out of the box temporal tables in PostgreSQL using delayed streaming replication and dblink extension

Constraints over multiple rows: How to cope with complex PostgreSQL constraints. Advanced techniques - enforce integrity; manage concurrency.

This tutorial will show you how to setup up and configure streaming replication for PostgreSQL 13 & how to set up database servers quickly.

TLS is a technology widely used in combination with PostgreSQL to encrypt client / server connections. This blogpost explains how TLS works.

"ERROR: deadlock detected" - message - what should I do? This article explains what this really means and how deadlocks can be prevented.

As designers, we are often burdened by the responsibility of producing and managing website content. It’s not our job to write it, but it’s not the client’s either. In many cases a vacuum emerges which ultimately gets filled with poor content. In this article, Matt Saunders will show you that you can avert disaster by including content production in the design process.

Resiliency is important at Shopify and although we have many tools to help us during incidents, some problems need to be fixed at the database level. At Shopify, we use ProxySQL to manage connections between applications and our MySQL databases

Cloudflare introduces Macrometa and Fauna as Edge database partners and adds database connectors for DynamoDB and Aurora to Cloudflare Workers, expanding what developers can build at the edge.

A new feature has arrived: "pg_read_all_data" - a predefined role that can run an unfettered pg_dump without that role being a superuser.

Basically, there are two ways to delete BLOBs (binary large objects):Change the PostgreSQL configuration or delete the BLOBs in chunks.

Visualizing spatial data is an important task. This tutorial helps you with getting started with visualizing OSM data with PostGIS and QGIS.

PostgreSQL allows you to define users (=roles), groups, etc. This post explains how to retrieve information on roles & role membership.

About a year ago, we migrated an old rate limiter in order to serve more traffic and accommodate a more resilient platform architecture. We adopted a replicated Redis backend with…