<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw" -->

---
title: That time PostgreSQL said &quot;no thanks, I don&#x27;t need your...
description: Explore the journey of optimizing PostgreSQL queries, from facing rejection of adding an index to eventually achieving a significant reduction in query latency...
canonical: https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: That time PostgreSQL said &quot;no thanks, I don&#x27;t need your index&quot; | daily.dev
og:description: Explore the journey of optimizing PostgreSQL queries, from facing rejection of adding an index to eventually achieving a significant reduction in query latency...
og:url: https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw
og:image: https://api.daily.dev/og/posts/Q4W6yTHnw.png
og:image:alt: That time PostgreSQL said &quot;no thanks, I don&#x27;t need your index&quot;
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# That time PostgreSQL said "no thanks, I don't need your index"

**[Lobsters](https://daily.dev/sources/lobsters)** · 8 min read · 33 upvotes · 4 comments

## Summary

Explore the journey of optimizing PostgreSQL queries, from facing rejection of adding an index to eventually achieving a significant reduction in query latency by refreshing the database's stale estimates.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jaywhy13.hashnode.dev/that-time-postgresql-said-no-thanks-i-dont-need-your-index>

## Community discussion

Top comments from developers on daily.dev.

**@qaudaffyazmi** · 3 upvotes

> Fun article. Postgresql is probably one of those i-know-better colleagues who refuse every attempt from others telling how it should work.

**@idoshamun** · 2 upvotes

> My favorite line:
> > Let's run it in prod! YOLO!
>
> Jokes aside, I love to read tales from the trenches

**@nicolellodev53** · 0 upvotes

> Good article, not just informative but also very clear

---

Tags: [#database](https://daily.dev/tags/database), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"That time PostgreSQL said \"no thanks, I don't need your index\"","url":"https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw"},"datePublished":"2024-05-16T02:13:20.191Z","dateModified":"2024-05-16T02:13:17.894Z","description":"Explore the journey of optimizing PostgreSQL queries, from facing rejection of adding an index to eventually achieving a significant reduction in query latency...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/818ee00b690bf391a333c756c7a97432?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/818ee00b690bf391a333c756c7a97432?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":33},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"database,postgresql","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"That time PostgreSQL said \"no thanks, I don't need your index\""}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/that-time-postgresql-said-no-thanks-i-don-t-need-your-index--q4w6ythnw","comment":[{"@type":"Comment","text":"Fun article. Postgresql is probably one of those i-know-better colleagues who refuse every attempt from others telling how it should work.","datePublished":"2024-05-16T23:31:44.523Z","url":"https://daily.dev/posts/Q4W6yTHnw#c-uHIbkXFbf","author":{"@type":"Person","name":"M. Qaudaffy Azmi","url":"https://daily.dev/qaudaffyazmi","image":"https://avatars.githubusercontent.com/u/909802?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"My favorite line:\n\nLet’s run it in prod! YOLO!\n\nJokes aside, I love to read tales from the trenches","datePublished":"2024-07-12T06:54:28.480Z","url":"https://daily.dev/posts/Q4W6yTHnw#c-P9GsFJlo2","author":{"@type":"Person","name":"Ido Shamun","url":"https://daily.dev/idoshamun","image":"https://media.daily.dev/image/upload/s---xy_OAwk--/f_auto,q_auto/v1703781380/avatars/avatar_28849d86070e4c099c877ab6837c61f0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Good article, not just informative but also very clear","datePublished":"2024-05-27T13:24:16.676Z","url":"https://daily.dev/posts/Q4W6yTHnw#c-6nyybrmMw","author":{"@type":"Person","name":"Nicola Migone","url":"https://daily.dev/nicolellodev53","image":"https://media.daily.dev/image/upload/s--hlzpTIS4--/f_auto/v1716818384/avatars/avatar_jl4W67rbZsckpznrHrJxw"}}]}
```

