A Deep Dive in How Slow SELECT * is @hnasr
A Deep Dive in How Slow SELECT * is  @hnasr
Uploaded May 2023 | Updated December 2026, 2 hours ago
Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
database.husseinnasser.com

In a row-store database engine, rows are stored in units called pages. Each page has a fixed header and contains multiple rows, with each row having a record header followed by its respective columns. When the database fetches a page and places it in the shared buffer pool, we gain access to all rows and columns within that page. So, the question arises: if we have all the columns readily available in memory, why would SELECT * be slow and costly? Is it really as slow as people claim it to be? And if so why is it so? In this post, we will explore these questions and more.

0:00 Intro
1:49 Database Page Layout
5:00 How SELECT Works
10:49 No Index-Only Scans
18:00 Deserialization Cost
21:00 Not All Columns are Inline
28:00 Network Cost
36:00 Client Deserialization

medium.com/@hnasr/how-slow-is-select-8d4308ca1f0c

Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
backend.husseinnasser.com

Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
network.husseinnasser.com


Follow me on Medium
medium.com/@hnasr/membership


Introduction to NGINX (link redirects to udemy with coupon)
nginx.husseinnasser.com

Python on the Backend (link redirects to udemy with coupon)
python.husseinnasser.com

Become a Member on YouTube
youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join

Buy me a coffee if you liked this
buymeacoffee.com/hnasr

Arabic Software Engineering Channel
youtube.com/channel/UChWZsjdoRvZ0T9QWZOD6UpA

🔥 Members Only Content
youtube.com/playlist?list=UUMO_ML5xP23TOWKUcc-oAE_Eg



🏭 Backend Engineering Videos in Order
backend.husseinnasser.com

💾 Database Engineering Videos
youtube.com/playlist?list=PLQnljOFTspQXjD0HOzN7P2tgzu7scWpl2

🎙️Listen to the Backend Engineering Podcast
husseinnasser.com/podcast

Gears and tools used on the Channel (affiliates)

🖼️ Slides and Thumbnail Design
Canva
partner.canva.com/c/2766475/647168/10068


Stay Awesome,
Hussein
A Deep Dive in How Slow SELECT * isThanks NX bitSocket Management in Backend System DesignWhy nobody watches YouTube tutorials anymoreThe Cloudflare mTLS vulnerability - A Deep Dive AnalysisHow Discord Stores Trillions of Messages | Deep DiveAsynchronous IO in Postgres 18 | The Backend Engineering ShowHow to route Docker containersThe problem with software engineeringThe genius of Linux Page TablesWhy create Index blocks writesone request = one h2 stream
Hussein Nasser |

A Deep Dive in How Slow SELECT * is

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER