---
title: "Discussion on \"How Does PostgreSQL Decide How to Execute a Query?\" | Hashnode"
description: "Discussion on \"How Does PostgreSQL Decide How to Execute a Query?\". Understand how PostgreSQL Query Optimizer works, how execution plans are generated, why indexes are not always used, and how to analyze slow queries with EXPLAIN ANALYZE."
url: "https://hashnode.com/posts/how-does-postgresql-decide-how-to-execute-a-query/6ae4cdcebe08cd0998069498"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Does PostgreSQL Decide How to Execute a Query?](https://blog.abolfazlmohajeri.ir/how-does-postgresql-decide-how-to-execute-a-query?utm_source=hashnode&utm_medium=feed)

Understand how PostgreSQL Query Optimizer works, how execution plans are generated, why indexes are not always used, and how to analyze slow queries with EXPLAIN ANALYZE.

Oct 30 · 14 min read · blog.abolfazlmohajeri.ir  
Read the article

-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#sql](https://hashnode.com/tag/sql)
-   [#database](https://hashnode.com/tag/database)
-   [#query-optimization](https://hashnode.com/tag/query-optimization)
-   [#backend](https://hashnode.com/tag/backend)

## Written by

[Abolfazl Mohajeri](https://hashnode.com/@abmohajeri)

@abmohajeri

  
[View profile](https://hashnode.com/@abmohajeri)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
