explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YESx

Settings
# exclusive inclusive rows x rows loops node
1. 191.805 1,286.946 ↑ 1.0 10,303 1

GroupAggregate (cost=2,086.44..2,781.89 rows=10,303 width=207) (actual time=1,025.429..1,286.946 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. 155.265 1,095.141 ↓ 1.0 10,504 1

Sort (cost=2,086.44..2,112.20 rows=10,303 width=160) (actual time=1,025.379..1,095.141 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. 140.341 939.876 ↓ 1.0 10,504 1

Hash Left Join (cost=970.73..1,399.71 rows=10,303 width=160) (actual time=301.244..939.876 rows=10,504 loops=1)

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

Hash Join (cost=934.18..1,336.01 rows=10,303 width=158) (actual time=300.715..799.027 rows=10,504 loops=1)

  • Hash Cond: (orders.source_id = s.id)
5. 142.922 658.548 ↓ 1.0 10,504 1

Hash Right Join (cost=897.63..1,272.32 rows=10,303 width=156) (actual time=300.036..658.548 rows=10,504 loops=1)

  • Hash Cond: (m.id = orders.match_id)
6. 142.510 356.148 ↓ 1.0 10,608 1

Hash Right Join (cost=454.82..802.44 rows=10,303 width=88) (actual time=140.531..356.148 rows=10,608 loops=1)

  • Hash Cond: (p.match_id = m.id)
7. 73.757 73.757 ↑ 1.0 10,504 1

Seq Scan on payments p (cost=0.00..320.04 rows=10,504 width=71) (actual time=0.620..73.757 rows=10,504 loops=1)

8. 69.937 139.881 ↓ 1.0 10,407 1

Hash (cost=326.03..326.03 rows=10,303 width=25) (actual time=139.875..139.881 rows=10,407 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 779kB
9. 69.944 69.944 ↓ 1.0 10,407 1

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

10. 80.379 159.478 ↑ 1.0 10,303 1

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

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

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

12. 0.049 0.657 ↑ 295.0 4 1

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

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

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

14. 0.040 0.508 ↑ 295.0 4 1

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

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

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

Planning time : 10.505 ms
Execution time : 1,353.122 ms