explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4bTo

Settings
# exclusive inclusive rows x rows loops node
1. 49.598 109.854 ↑ 1.0 10,200 1

GroupAggregate (cost=976.58..1,125.90 rows=10,298 width=229) (actual time=58.482..109.854 rows=10,200 loops=1)

  • Group Key: s.name, orders.company_id, orders.order_id, orders.gross_sales, orders.discounts, orders.shipping, orders.tax, orders.total_paid, orders.currency, orders.ordered_at, m.match_type, m.reconciliation_status
2. 31.800 60.256 ↓ 1.0 10,300 1

Sort (cost=976.58..981.73 rows=10,298 width=204) (actual time=58.426..60.256 rows=10,300 loops=1)

  • Sort Key: s.name, orders.company_id, orders.order_id, orders.gross_sales, orders.discounts, orders.shipping, orders.tax, orders.total_paid, orders.currency, orders.ordered_at, m.match_type, m.reconciliation_status
  • Sort Method: quicksort Memory: 3,108kB
3. 3.038 28.456 ↓ 1.0 10,300 1

Hash Left Join (cost=540.16..839.30 rows=10,298 width=204) (actual time=14.397..28.456 rows=10,300 loops=1)

  • Hash Cond: (p.source_id = s2.id)
4. 2.991 25.411 ↓ 1.0 10,300 1

Hash Join (cost=525.61..819.30 rows=10,298 width=180) (actual time=14.372..25.411 rows=10,300 loops=1)

  • Hash Cond: (orders.source_id = s.id)
5. 4.935 22.397 ↓ 1.0 10,300 1

Hash Right Join (cost=511.06..799.29 rows=10,298 width=156) (actual time=14.339..22.397 rows=10,300 loops=1)

  • Hash Cond: ((p.match_id = m.id) AND (p.company_id = orders.company_id))
6. 3.194 3.194 ↓ 1.0 10,300 1

Seq Scan on payments p (cost=0.00..241.89 rows=10,298 width=79) (actual time=0.006..3.194 rows=10,300 loops=1)

7. 3.872 14.268 ↑ 1.0 10,200 1

Hash (cost=470.26..470.26 rows=10,200 width=101) (actual time=14.268..14.268 rows=10,200 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,563kB
8. 3.049 10.396 ↑ 1.0 10,200 1

Hash Left Join (cost=237.30..470.26 rows=10,200 width=101) (actual time=4.221..10.396 rows=10,200 loops=1)

  • Hash Cond: (orders.match_id = m.id)
9. 3.215 3.215 ↑ 1.0 10,200 1

Seq Scan on orders (cost=0.00..227.60 rows=10,200 width=84) (actual time=0.005..3.215 rows=10,200 loops=1)

10. 1.995 4.132 ↓ 1.0 10,300 1

Hash (cost=201.60..201.60 rows=10,200 width=25) (actual time=4.132..4.132 rows=10,300 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 772kB
11. 2.137 2.137 ↓ 1.0 10,300 1

Seq Scan on matches m (cost=0.00..201.60 rows=10,200 width=25) (actual time=0.005..2.137 rows=10,300 loops=1)

12. 0.013 0.023 ↑ 175.0 4 1

Hash (cost=12.10..12.10 rows=700 width=40) (actual time=0.023..0.023 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.010 0.010 ↑ 175.0 4 1

Seq Scan on sources s (cost=0.00..12.10 rows=700 width=40) (actual time=0.009..0.010 rows=4 loops=1)

14. 0.004 0.007 ↑ 175.0 4 1

Hash (cost=12.10..12.10 rows=700 width=40) (actual time=0.007..0.007 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.003 0.003 ↑ 175.0 4 1

Seq Scan on sources s2 (cost=0.00..12.10 rows=700 width=40) (actual time=0.003..0.003 rows=4 loops=1)

Planning time : 1.941 ms
Execution time : 110.863 ms