Markus Winand's Avatar

Markus Winand

@winand.at

SQL Renaissance Ambassador. Author, Trainer, Coach. PhD in Common Sense. Creator of http://use-the-index-luke.com and http://modern-sql.com.

1,295
Followers
64
Following
276
Posts
22.11.2023
Joined
Posts Following

Latest posts by Markus Winand @winand.at

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.

10.03.2026 11:48 πŸ‘ 6 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

AI is the future?

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

03.03.2026 11:14 πŸ‘ 70 πŸ” 10 πŸ’¬ 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...

24.02.2026 19:35 πŸ‘ 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

16.02.2026 21:44 πŸ‘ 9 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

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

17.02.2026 00:20 πŸ‘ 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?

17.02.2026 08:04 πŸ‘ 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.

16.02.2026 08:05 πŸ‘ 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!

13.02.2026 12:02 πŸ‘ 10 πŸ” 3 πŸ’¬ 4 πŸ“Œ 0

Which was wrong?

13.02.2026 13:08 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
Gilbert U-238 Atomic Energy Laboratory – Wikipedia

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

10.02.2026 16:20 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
CCC vs GCC A Guide to comparing Claude Code Compiler with GCC

Claude's C Compiler vs. GCC | Discussion

09.02.2026 05:40 πŸ‘ 3 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0

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

06.02.2026 05:50 πŸ‘ 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...

05.02.2026 08:18 πŸ‘ 10 πŸ” 2 πŸ’¬ 2 πŸ“Œ 0

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

04.02.2026 15:15 πŸ‘ 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.

02.02.2026 14:37 πŸ‘ 8 πŸ” 1 πŸ’¬ 0 πŸ“Œ 1

Time to re-watch The Terminator (1984)

01.02.2026 13:36 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

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

28.01.2026 14:51 πŸ‘ 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

28.01.2026 14:29 πŸ‘ 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.

28.01.2026 14:28 πŸ‘ 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.

28.01.2026 14:28 πŸ‘ 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 :)

🧡

28.01.2026 14:28 πŸ‘ 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

26.01.2026 06:34 πŸ‘ 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.

24.01.2026 17:32 πŸ‘ 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).

24.01.2026 13:38 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Probably coming in PostgreSQL 19, btw.

23.01.2026 08:09 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
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

22.01.2026 12:47 πŸ‘ 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.

22.01.2026 08:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

Quelle: Der Standard

22.01.2026 05:53 πŸ‘ 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.

🧡

21.01.2026 12:45 πŸ‘ 2 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

The linked manual says

INSTALL COMPONENT 'file://classic_hashing'

but for me only

INSTALL COMPONENT 'file://component_classic_hashing'

works.

21.01.2026 16:53 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0