Logo
YCombinator: Not just for startups.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Table-scan Memes

Posts tagged with Table-scan

Why Does Count (*) Take So Long When The Database Already Knows How Many Rows It Has? 🤔

Databases Programming Backend
3 months ago 60.7M views 0 shares
Why Does Count (*) Take So Long When The Database Already Knows How Many Rows It Has? 🤔
You'd think the database would just... know, right? Like it's literally keeping track of everything. But nope, your innocent COUNT(*) on a million-row table just triggered a full table scan that took 45 seconds. The database is out here counting every single row like a kindergartener learning numbers for the first time. Here's the kicker: most databases don't maintain an exact row count because of MVCC (Multi-Version Concurrency Control) and transaction isolation. Different transactions might see different row counts at the same time, so the database can't just keep one magical number. Instead, it has to actually count them all, respecting your WHERE clauses, deleted rows, and whatever chaos your concurrent transactions are causing. Fun times. Pro tip: If you need fast counts, either use approximations, maintain your own counter table, or just accept that coffee breaks are now a legitimate part of your query execution strategy. ☕

Today's picks

Employee Vs Freelancer Vs Founder Vs Vibe Coder

Employee Vs Freelancer Vs Founder Vs Vibe Coder

Programming
291.2M views 13 days ago
NordVPN

NordVPN

Sponsored
VPN
VILVA 15.6" FHD IPS USB-C HDMI Portable Monitor | 15.6" FHD IPS, USB-C/HDMI, cover+speakers, for PC/Mac/Phone/Xbox/Switch/PS4, portable.

VILVA 15.6" FHD IPS USB-C HDMI Portable Monitor | 15.6" FHD IPS, USB-C/HDMI, cover+speakers, for PC/Mac/Phone/Xbox/Switch/PS4, portable.

Affiliate
$39.99