explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l0Wr

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5,339.37..6,934.99 rows=1 width=4,332) (actual rows= loops=)

  • Join Filter: (p0_.id = no.project_id)
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.58..968.21 rows=1 width=3,706) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.30..959.91 rows=1 width=3,264) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..947.79 rows=1 width=2,798) (actual rows= loops=)

  • Join Filter: (p0_.company_id = c1_.id)
5. 0.000 0.000 ↓ 0.0

Seq Scan on project p0_ (cost=0.00..946.11 rows=1 width=1,902) (actual rows= loops=)

  • Filter: ((secure_id)::text = 'y7FXQytt'::text)
6. 0.000 0.000 ↓ 0.0

Seq Scan on company c1_ (cost=0.00..1.30 rows=30 width=896) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on project_cover p2_ (cost=4.30..12.11 rows=1 width=466) (actual rows= loops=)

  • Recheck Cond: (p0_.id = project_id)
  • Filter: is_active_flag
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on project_cover_b423e462d8dae182f829545d6bd17a70 (cost=0.00..4.30 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (p0_.id = project_id)
9. 0.000 0.000 ↓ 0.0

Index Scan using project_banner_b423e462d8dae182f829545d6bd17a70 on project_banner p3_ (cost=0.28..8.29 rows=1 width=442) (actual rows= loops=)

  • Index Cond: (p0_.id = project_id)
  • Filter: is_active_flag
10. 0.000 0.000 ↓ 0.0

CTE Scan on normalized_orders no (cost=5,334.79..5,963.62 rows=140 width=626) (actual rows= loops=)

  • Filter: ("order" = 1)
11.          

CTE normalized_orders

12. 0.000 0.000 ↓ 0.0

WindowAgg (cost=4,775.83..5,334.79 rows=27,948 width=64) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=4,775.83..4,845.70 rows=27,948 width=64) (actual rows= loops=)

  • Sort Key: d.project_id, d.order_number
14. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,075.00..2,711.81 rows=27,948 width=64) (actual rows= loops=)

  • Hash Cond: (d.project_id = p.id)
15. 0.000 0.000 ↓ 0.0

Seq Scan on document d (cost=0.00..1,252.52 rows=27,948 width=56) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)
16. 0.000 0.000 ↓ 0.0

Hash (cost=913.89..913.89 rows=12,889 width=8) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on project p (cost=0.00..913.89 rows=12,889 width=8) (actual rows= loops=)