explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ArtO

Settings
# exclusive inclusive rows x rows loops node
1. 191.783 1,412.039 ↑ 1.0 10,303 1

GroupAggregate (cost=2,320.89..3,016.35 rows=10,303 width=228) (actual time=1,151.094..1,412.039 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, (COALESCE(m.reconciliation_status, mm.reconciliation_status))
2. 157.277 1,220.256 ↓ 1.0 10,504 1

Sort (cost=2,320.89..2,346.65 rows=10,303 width=181) (actual time=1,151.045..1,220.256 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, (COALESCE(m.reconciliation_status, mm.reconciliation_status))
  • Sort Method: quicksort Memory: 3,110kB
3. 139.805 1,062.979 ↓ 1.0 10,504 1

Hash Left Join (cost=1,019.27..1,634.16 rows=10,303 width=181) (actual time=302.994..1,062.979 rows=10,504 loops=1)

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

Hash Left Join (cost=982.72..1,570.46 rows=10,303 width=190) (actual time=302.275..922.479 rows=10,504 loops=1)

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

Hash Left Join (cost=505.12..912.56 rows=10,303 width=135) (actual time=157.528..637.122 rows=10,303 loops=1)

  • Hash Cond: (orders.manual_match_id = mm.id)
6. 136.831 502.125 ↑ 1.0 10,303 1

Hash Join (cost=479.37..859.60 rows=10,303 width=111) (actual time=156.935..502.125 rows=10,303 loops=1)

  • Hash Cond: (orders.source_id = s.id)
7. 140.823 364.805 ↑ 1.0 10,303 1

Hash Right Join (cost=442.82..795.90 rows=10,303 width=109) (actual time=156.424..364.805 rows=10,303 loops=1)

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

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

9. 77.603 155.703 ↑ 1.0 10,303 1

Hash (cost=314.03..314.03 rows=10,303 width=92) (actual time=155.697..155.703 rows=10,303 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,416kB
10. 78.100 78.100 ↑ 1.0 10,303 1

Seq Scan on orders (cost=0.00..314.03 rows=10,303 width=92) (actual time=0.388..78.100 rows=10,303 loops=1)

11. 0.050 0.489 ↑ 295.0 4 1

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

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

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

13. 0.014 0.570 ↓ 0.0 0 1

Hash (cost=17.00..17.00 rows=700 width=40) (actual time=0.564..0.570 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
14. 0.556 0.556 ↓ 0.0 0 1

Seq Scan on manual_matches mm (cost=0.00..17.00 rows=700 width=40) (actual time=0.550..0.556 rows=0 loops=1)

15. 72.757 144.722 ↑ 1.0 10,504 1

Hash (cost=320.04..320.04 rows=10,504 width=79) (actual time=144.717..144.722 rows=10,504 loops=1)

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

Seq Scan on payments p (cost=0.00..320.04 rows=10,504 width=79) (actual time=0.459..71.965 rows=10,504 loops=1)

17. 0.037 0.695 ↑ 295.0 4 1

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

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

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

Planning time : 10.777 ms
Execution time : 1,477.860 ms