Topics /

Databases & Data

The most popular blog posts about databases & data on Hacker News. 4,224 posts.

Any year
3601

MySQL Text vs. Varchar Performance

Starting with MySQL 5.0.3, the maximum field length for VARCHAR fields was increased from 255 characters to 65,535 characters. This is good news, as VARCHAR fields, as opposed to TEXT fields, are stored in-row for the MyISAM storage engine (InnoDB has different characteristics). TEXT and BLOB fields are not stored…

3610

Generate QR Codes with Pure SQL in PostgreSQL

As my cat woke me up way too early for a Saturday morning, I decided to put all this extra time (and my ChatGPT Pro subscription) into good use and generated a QR-code generator for PostgreSQL, written as a single pure SQL statement. No external libraries or Postgres extension installation needed! The pqr.sql example…

3615

Understanding the N + 1 queries problem

In this post, I am going to talk about the N + 1 queries problem. While trying to solve this problem myself recently, I noticed most of the blog posts only talk about the very simple version of the problem and the proposed solutions would break down when the use cases get complex. I will try to get into more depth and…