Skip to content
onsuggest
Log in
Article en

Postgres not using your index? It's counting pages, not rows

Source: Hacker Noon ·

You get a Seq Scan even with an index because the planner prices a query in pages, and a small table is cheaper to read whole.

What is Postgres not using your index? It's counting pages, not rows?

Postgres not using your index? It's counting pages, not rows is a article discovery curated from Hacker Noon. You get a Seq Scan even with an index because the planner prices a query in pages, and a small table is cheaper to read whole.

How can I access or experience this?

You can experience this content directly on its original host (Hacker Noon) by clicking the "Open Original" button.

Where does this content come from?

Curated from Hacker Noon by the OnSuggest team to surface the most interesting and serendipitous content on the web.

Keyboard shortcuts

Previous discovery
←P
Next discovery
→N
Like
L
Not for me
X
Save
S
Show this help
?
Close
Esc

Shortcuts work on the discovery page.