Open in app
Haki Benita
2.5K Followers
About

Sign in

2.5K Followers
About
Open in app
Your point about CTEs and the materialization of the result set is valid, but your example is a bit…
77
1

Douglas Hunley

Haki Benita

Haki Benita

Sep 20, 2018·1 min read

Hey Douglas,
You are right — the examples does not make sense on their own. There is not reason to write with x as (select * from foo) select * from x where id < :n. I used this example to simply illustrate the effect of using CTE inappropriately.

Written by

Haki Benita

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

More from Haki Benita

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

More From Medium

How We Solved a Storage Problem in PostgreSQL Without Adding a Single Byte of Storage

Haki Benita

Be careful with CTE in PostgreSQL

Haki Benita

Optimizing Django Admin Paginator

Haki Benita

The 5 Big Lies the Trump Crowd Will be Telling in the Coming Weeks

Kevin King in Politically Speaking

8 weight loss hacks that helped reduce my body fat

Insider in Insider

Three Life Lessons From a Dying Man

Aaron Nichols in Live Your Life On Purpose

This Is What It Will Take For Bitcoin To Reach $100,000

Concoda in Concoda

SARS Cov-2 Is (Probably) Becoming Endemic. What Does That Mean?

Linda Dahl in Elemental

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store