explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gmR

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

Sort (cost=174,002.80..174,299.68 rows=118,753 width=293) (actual rows= loops=)

  • Sort Key: p.id DESC
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30,161.00..147,756.85 rows=118,753 width=293) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Seq Scan on company co (cost=0.00..5.12 rows=1 width=51) (actual rows= loops=)

  • Filter: (id = 34)
4. 0.000 0.000 ↓ 0.0

Gather (cost=30,161.00..145,376.66 rows=118,753 width=143) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=29,161.00..132,501.36 rows=49,480 width=143) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Join (cost=29,160.43..41,678.36 rows=418 width=53) (actual rows= loops=)

  • Hash Cond: ((s.shipcode)::text = (ship.shipcode)::text)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=29,139.44..41,656.26 rows=418 width=37) (actual rows= loops=)

  • Hash Cond: (s.upload_id = u.id)
8. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on sailing s (cost=496.36..10,737.66 rows=10,104 width=37) (actual rows= loops=)

  • Recheck Cond: (company_id = 34)
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on sailing_company_id_idx (cost=0.00..490.30 rows=24,250 width=0) (actual rows= loops=)

  • Index Cond: (company_id = 34)
10. 0.000 0.000 ↓ 0.0

Hash (cost=21,201.44..21,201.44 rows=428,051 width=16) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Scan using upload_createddate_idx on upload u (cost=0.44..21,201.44 rows=428,051 width=16) (actual rows= loops=)

  • Index Cond: (createddate > (CURRENT_DATE - '30 days'::interval))
12. 0.000 0.000 ↓ 0.0

Hash (cost=13.22..13.22 rows=622 width=26) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on "Ship" ship (cost=0.00..13.22 rows=622 width=26) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using passenger_sailing_fk_idx on passenger p (cost=0.57..194.83 rows=2,245 width=106) (actual rows= loops=)

  • Index Cond: (sailing_fk = s.id)