explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zGjU

Settings
# exclusive inclusive rows x rows loops node
1. 32.233 89.487 ↑ 1.0 10,303 1

GroupAggregate (cost=2,268.03..2,963.48 rows=10,303 width=207) (actual time=56.007..89.487 rows=10,303 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. 24.724 57.254 ↓ 1.0 10,504 1

Sort (cost=2,268.03..2,293.79 rows=10,303 width=160) (actual time=55.981..57.254 rows=10,504 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,110kB
3. 3.914 32.530 ↓ 1.0 10,504 1

Hash Left Join (cost=993.62..1,581.30 rows=10,303 width=160) (actual time=11.568..32.530 rows=10,504 loops=1)

  • Hash Cond: (p.source_id = s2.id)
4. 5.923 28.067 ↓ 1.0 10,504 1

Hash Left Join (cost=957.07..1,517.60 rows=10,303 width=158) (actual time=11.009..28.067 rows=10,504 loops=1)

  • Hash Cond: ((m.id = p.match_id) AND (orders.company_id = p.company_id))
5. 3.541 17.012 ↑ 1.0 10,303 1

Hash Join (cost=479.37..859.60 rows=10,303 width=103) (actual time=5.862..17.012 rows=10,303 loops=1)

  • Hash Cond: (orders.source_id = s.id)
6. 6.250 13.088 ↑ 1.0 10,303 1

Hash Right Join (cost=442.82..795.90 rows=10,303 width=101) (actual time=5.474..13.088 rows=10,303 loops=1)

  • Hash Cond: (m.id = orders.match_id)
7. 1.795 1.795 ↓ 1.0 10,407 1

Seq Scan on matches m (cost=0.00..326.03 rows=10,303 width=25) (actual time=0.417..1.795 rows=10,407 loops=1)

8. 2.200 5.043 ↑ 1.0 10,303 1

Hash (cost=314.03..314.03 rows=10,303 width=84) (actual time=5.043..5.043 rows=10,303 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,336kB
9. 2.843 2.843 ↑ 1.0 10,303 1

Seq Scan on orders (cost=0.00..314.03 rows=10,303 width=84) (actual time=0.353..2.843 rows=10,303 loops=1)

10. 0.004 0.383 ↑ 295.0 4 1

Hash (cost=21.80..21.80 rows=1,180 width=18) (actual time=0.383..0.383 rows=4 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
11. 0.379 0.379 ↑ 295.0 4 1

Seq Scan on sources s (cost=0.00..21.80 rows=1,180 width=18) (actual time=0.378..0.379 rows=4 loops=1)

12. 2.364 5.132 ↑ 1.0 10,504 1

Hash (cost=320.08..320.08 rows=10,508 width=79) (actual time=5.132..5.132 rows=10,504 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,277kB
13. 2.768 2.768 ↑ 1.0 10,504 1

Seq Scan on payments p (cost=0.00..320.08 rows=10,508 width=79) (actual time=0.458..2.768 rows=10,504 loops=1)

14. 0.005 0.549 ↑ 295.0 4 1

Hash (cost=21.80..21.80 rows=1,180 width=18) (actual time=0.549..0.549 rows=4 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
15. 0.544 0.544 ↑ 295.0 4 1

Seq Scan on sources s2 (cost=0.00..21.80 rows=1,180 width=18) (actual time=0.543..0.544 rows=4 loops=1)

Planning time : 6.822 ms
Execution time : 90.298 ms