explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KTKd

Settings
# exclusive inclusive rows x rows loops node
1. 214.611 1,276.890 ↑ 1.0 10,200 1

GroupAggregate (cost=2,048.38..2,736.88 rows=10,200 width=229) (actual time=986.933..1,276.890 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. 160.951 1,062.279 ↓ 1.0 10,300 1

Sort (cost=2,048.38..2,073.88 rows=10,200 width=204) (actual time=986.884..1,062.279 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,056kB
3. 135.906 901.328 ↓ 1.0 10,300 1

Hash Left Join (cost=788.72..1,369.25 rows=10,200 width=204) (actual time=422.724..901.328 rows=10,300 loops=1)

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

Hash Join (cost=787.63..1,313.02 rows=10,200 width=180) (actual time=422.295..765.026 rows=10,300 loops=1)

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

Hash Right Join (cost=786.54..1,256.79 rows=10,200 width=156) (actual time=421.772..628.615 rows=10,300 loops=1)

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

Seq Scan on payments p (cost=0.00..291.00 rows=10,300 width=79) (actual time=0.434..66.752 rows=10,300 loops=1)

7. 70.134 421.233 ↑ 1.0 10,200 1

Hash (cost=633.54..633.54 rows=10,200 width=101) (actual time=421.225..421.233 rows=10,200 loops=1)

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

Hash Left Join (cost=328.75..633.54 rows=10,200 width=101) (actual time=149.245..351.099 rows=10,200 loops=1)

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

Seq Scan on orders (cost=0.00..278.00 rows=10,200 width=84) (actual time=0.625..66.723 rows=10,200 loops=1)

10. 74.425 148.518 ↑ 1.0 10,300 1

Hash (cost=200.00..200.00 rows=10,300 width=25) (actual time=148.510..148.518 rows=10,300 loops=1)

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

Seq Scan on matches m (cost=0.00..200.00 rows=10,300 width=25) (actual time=0.391..74.093 rows=10,300 loops=1)

12. 0.060 0.494 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=40) (actual time=0.486..0.494 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.434 0.434 ↑ 1.0 4 1

Seq Scan on sources s (cost=0.00..1.04 rows=4 width=40) (actual time=0.393..0.434 rows=4 loops=1)

14. 0.044 0.396 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=40) (actual time=0.389..0.396 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.352 0.352 ↑ 1.0 4 1

Seq Scan on sources s2 (cost=0.00..1.04 rows=4 width=40) (actual time=0.319..0.352 rows=4 loops=1)

Planning time : 24.126 ms
Execution time : 1,351.327 ms