explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Sao

Settings
# exclusive inclusive rows x rows loops node
1. 1.767 475.888 ↓ 455.0 455 1

Nested Loop Left Join (cost=3,197.23..23,507.97 rows=1 width=633) (actual time=19.186..475.888 rows=455 loops=1)

2. 0.219 470.026 ↓ 455.0 455 1

Nested Loop Left Join (cost=3,196.81..23,507.41 rows=1 width=67) (actual time=19.175..470.026 rows=455 loops=1)

3. 0.986 468.667 ↓ 380.0 380 1

Nested Loop Anti Join (cost=3,196.39..23,506.88 rows=1 width=71) (actual time=19.170..468.667 rows=380 loops=1)

4. 6.861 445.401 ↓ 6.6 5,570 1

Nested Loop Left Join (cost=3,195.97..23,112.72 rows=843 width=75) (actual time=16.676..445.401 rows=5,570 loops=1)

5. 0.841 416.320 ↓ 6.6 5,555 1

Nested Loop Left Join (cost=3,195.54..22,673.55 rows=843 width=71) (actual time=16.669..416.320 rows=5,555 loops=1)

6. 1.138 326.599 ↓ 6.6 5,555 1

Nested Loop Left Join (cost=3,195.11..21,795.30 rows=843 width=52) (actual time=16.561..326.599 rows=5,555 loops=1)

7. 5.663 264.356 ↓ 6.6 5,555 1

Nested Loop Left Join (cost=3,194.82..21,513.95 rows=843 width=37) (actual time=16.493..264.356 rows=5,555 loops=1)

8. 2.982 230.918 ↓ 6.6 5,555 1

Hash Join (cost=3,194.40..21,078.54 rows=843 width=33) (actual time=16.487..230.918 rows=5,555 loops=1)

  • Hash Cond: (order_milestones.milestone_id = milestones.id)
9. 4.936 227.909 ↓ 3.0 7,496 1

Nested Loop (cost=3,193.35..21,059.58 rows=2,528 width=37) (actual time=16.451..227.909 rows=7,496 loops=1)

10. 67.455 188.725 ↓ 2.9 5,708 1

Hash Join (cost=3,192.93..20,009.57 rows=1,985 width=29) (actual time=16.437..188.725 rows=5,708 loops=1)

  • Hash Cond: (orders.buyer_vendor_id = buyer_vendors.id)
11. 104.912 104.912 ↑ 1.0 233,428 1

Seq Scan on orders (cost=0.00..15,921.12 rows=233,512 width=29) (actual time=0.010..104.912 rows=233,428 loops=1)

12. 0.579 16.358 ↓ 1.1 2,288 1

Hash (cost=3,165.99..3,165.99 rows=2,155 width=4) (actual time=16.358..16.358 rows=2,288 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 113kB
13. 15.452 15.779 ↓ 1.1 2,288 1

Bitmap Heap Scan on buyer_vendors (cost=41.12..3,165.99 rows=2,155 width=4) (actual time=0.552..15.779 rows=2,288 loops=1)

  • Recheck Cond: (vendor_id = 30)
  • Heap Blocks: exact=1617
14. 0.327 0.327 ↓ 1.1 2,291 1

Bitmap Index Scan on index_buyer_vendors_on_vendor_id (cost=0.00..40.58 rows=2,155 width=0) (actual time=0.327..0.327 rows=2,291 loops=1)

  • Index Cond: (vendor_id = 30)
15. 34.248 34.248 ↑ 2.0 1 5,708

Index Scan using index_order_milestones_on_order_id on order_milestones (cost=0.42..0.51 rows=2 width=12) (actual time=0.005..0.006 rows=1 loops=5,708)

  • Index Cond: (order_id = orders.id)
16. 0.003 0.027 ↑ 1.0 1 1

Hash (cost=1.04..1.04 rows=1 width=4) (actual time=0.027..0.027 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.024 0.024 ↑ 1.0 1 1

Seq Scan on milestones (cost=0.00..1.04 rows=1 width=4) (actual time=0.023..0.024 rows=1 loops=1)

  • Filter: ((name)::text = 'submitted'::text)
  • Rows Removed by Filter: 2
18. 27.775 27.775 ↑ 1.0 1 5,555

Index Scan using buyer_vendors_pkey on buyer_vendors buyer_vendors_public_orders (cost=0.42..0.51 rows=1 width=12) (actual time=0.005..0.005 rows=1 loops=5,555)

  • Index Cond: (id = orders.buyer_vendor_id)
19. 61.105 61.105 ↑ 1.0 1 5,555

Index Scan using buyers_pkey on buyers (cost=0.29..0.32 rows=1 width=23) (actual time=0.010..0.011 rows=1 loops=5,555)

  • Index Cond: (id = buyer_vendors_public_orders.buyer_id)
20. 88.880 88.880 ↑ 1.0 1 5,555

Index Scan using accounts_pkey on accounts (cost=0.43..1.03 rows=1 width=23) (actual time=0.015..0.016 rows=1 loops=5,555)

  • Index Cond: (id = buyer_vendors_public_orders.account_id)
21. 22.220 22.220 ↑ 2.0 1 5,555

Index Scan using index_account_assignments_on_account_id on account_assignments (cost=0.43..0.50 rows=2 width=8) (actual time=0.004..0.004 rows=1 loops=5,555)

  • Index Cond: (account_id = accounts.id)
22. 22.280 22.280 ↑ 1.0 1 5,570

Index Only Scan using users_pkey on users (cost=0.42..0.46 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=5,570)

  • Index Cond: (id = account_assignments.sales_rep_id)
  • Heap Fetches: 5190
23. 1.140 1.140 ↑ 2.0 1 380

Index Only Scan using index_order_milestones_on_order_id on order_milestones order_milestones_public_orders (cost=0.42..0.51 rows=2 width=4) (actual time=0.002..0.003 rows=1 loops=380)

  • Index Cond: (order_id = orders.id)
  • Heap Fetches: 455
24. 4.095 4.095 ↑ 1.0 1 455

Index Scan using users_pkey on users created_bies_public_order_milestones (cost=0.42..0.55 rows=1 width=17) (actual time=0.009..0.009 rows=1 loops=455)

  • Index Cond: (id = order_milestones.created_by_id)