Logo
Edison used 'bug' before computers existed.
  • 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

Where's The Love

Where's The Love

Programming
149.4M views 8 days ago
Coexist Peace Religion Equality Rights Humanity Spirituality T-Shirt

Coexist Peace Religion Equality Rights Humanity Spirituality T-Shirt

Affiliate
$13.99
NordVPN

NordVPN

Sponsored
VPN