Advertisement · 728 × 90

Posts by Markus Winand

Preview
Order-Equivalence Do identical OVER clauses always produce identical row orders?

Should these functions return the same value?

SELECT
ROW_NUMBER() OVER (ORDER BY x),
ROW_NUMBER() OVER (ORDER BY x)
FROM ...

What about when many rows have the same value for X?

According to the #SQL standard: yes

@winand.at investigates

2 weeks ago 5 2 1 0

Order-equivalent OVER clauses

modern-sql.com/blog/2026-03...

About an important but rarely appreciated aspect when using multiple OVER clauses in a single query.

1 month ago 8 0 0 1

AI is the future?

Well, if we cannot buy computers anymore, it sounds like stone age to me.

1 month ago 70 9 9 2
Preview
Row Locks With Joins Can Produce Surprising Results in PostgreSQL The strange edge case that triggered our assertions

hakibenita.com/postgres-row...

1 month ago 2 0 0 0

i love databases i love databases i love databases writing sql is fun writing sql is fun writing sql is fun

1 month ago 9 1 2 0

a single SQL class has brought immeasurable peace and happiness in my professional life. who knew?

1 month ago 10 2 0 0
AI SQL Benchmark We benchmark the performance of AI SQL models against a human baseline to help you choose the best model for your needs.

Reading about LLM's accuracy to produce SQL queries I ran into llm-benchmark.tinybird.live.

According to their study, the average accuracy/exactness is ~50%. So half of the time models returns a query than runs but returns a wrong answer.

How are people using this in production?

1 month ago 8 3 0 0

I wonder when we see the first OpenClaw worm, if there isn't one already.

Switching off your Mac Mini won't stop it.

1 month ago 2 1 0 0
Preview
3-Minute Quiz: What do you know about SQL performance? Just 5 questions to see how much you know about SQL performance. Never make these mistakes again.

Think you know about #SQL performance?

Take this 3-minute indexing quiz by @winand.at

A simple test that 60% fail!

buff.ly/5C4XZ7N

Did you pass? Let us know how you did!

1 month ago 10 3 4 0

Which was wrong?

1 month ago 1 0 1 0
Advertisement
Preview
Gilbert U-238 Atomic Energy Laboratory – Wikipedia

Reminder: de.wikipedia.org/wiki/Gilbert...

2 months ago 1 0 0 0
Preview
CCC vs GCC A Guide to comparing Claude Code Compiler with GCC

Claude's C Compiler vs. GCC | Discussion

2 months ago 3 3 0 0

Thanks. It's fixed. I did indeed not understand your first comment ;)

2 months ago 1 0 0 0
Preview
Comments Inside SQL Statements C-style comments work in SQL, with nesting

SQL Comments, Please!
modern-sql.com/caniuse/comm...

2 months ago 10 2 2 0

What is random, but actually useful, things you wish you had a SQL interface for?

2 months ago 2 1 0 0
Preview
Infinite Recursion Guards Protection against infinite loops for WITH RECURSIVE.

Infinite Recursion Guards

modern-sql.com/caniuse/with...

With recursive is the only SQL construct that is not guaranteed to terminate, eventually. As the DBMS is typically a very crucial system, infinite loops must be prevented at all times. See how various SQL systems help you.

2 months ago 8 1 0 1

Time to re-watch The Terminator (1984)

2 months ago 2 0 0 0
Advertisement

If 26ai means 23.26.1 but not 23.26.0, then yes :)

2 months ago 0 0 0 0
Preview
The FILTER clause The FILTER clause extends aggregate functions (SUM, AVG, COUNT, etc.) with an additional WHERE clause. Databases not supporting FILTER can use CASE within the aggregate function instead.

FILTER on modern-sql.com: modern-sql.com/feature/filter

2 months ago 2 0 1 0

Oh, BTW, I’m also ecstatic about ASSERTION, but I’ll need some time to cover it on modern-sql.com.

2 months ago 2 0 1 0

FILTER was the first feature I covered on modern-sql.com, only supported by PostgreSQL at the time. In the meanwhile, half the system I cover support FILTER. Frankly speaking, I cannot understand why there are still systems not support such a simple, easy to understand and useful feature.

2 months ago 0 0 1 0
Infographic showing that PostgreSQL supports FILTER since 2015, followed by H2 and SQLite in 2019, DuckDB 2024 (first tested release) and now Oracle in 2026.

Infographic showing that PostgreSQL supports FILTER since 2015, followed by H2 and SQLite in 2019, DuckDB 2024 (first tested release) and now Oracle in 2026.

I’m a simple man.

While Oracle people are ecstatic about ASSERTION in the just released version 23.26.1 of the Oracle Database, I’m happy to see something as simple as FILTER :)

🧵

2 months ago 8 1 1 0
Preview
SQL Indexing and Tuning e-Book for developers: Use The Index, Luke covers Oracle, MySQL, PostgreSQL, SQL Server, ... SQL indexing and tuning tutorial for developers. No unnecessary database details—just what developers need to know. Covers all major SQL databases.

Just in case you don’t know yet: use-the-index-luke.com

2 months ago 2 0 0 0

Permission granted ;) Go ahead.

I’d expect that the app should use prepared statements when it is designed to executes the same query often.

2 months ago 1 0 2 0

Latencies are often
misunderstood. Also the IO latency in cloud environments, which are often many factors higher as on local discs (during development).

2 months ago 2 0 1 0

Probably coming in PostgreSQL 19, btw.

2 months ago 4 0 0 0
Advertisement
Preview
T616, “Null treatment option for LEAD and LAG functions” T616, “Null treatment option for LEAD and LAG functions” in SQL

LEAD(x) IGNORE NULLS OVER(ORDER BY n)

Not very often, but when I need IGNORE NULLS, then I really miss it in PostgreSQL.

modern-sql.com/caniuse/T616

2 months ago 7 3 1 1

From the license perspective a tarball would be fine.

But I think open source is more than that. For me it is a spectrum where MySQL is pretty close to the least openness.

2 months ago 0 0 1 0
Post image

Quelle: Der Standard

2 months ago 1 0 0 0

Recent posts made the point that MySQL is dying. One of the arguments was that there are no Git commits in the past months. This particular argument is totally misleading.

🧵

2 months ago 2 3 1 0