explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iTFr : 3rd

Settings
# exclusive inclusive rows x rows loops node
1. 182,489.827 182,998.211 ↓ 1.1 80,134 1

Hash Left Join (cost=1,303.53..149,889.16 rows=75,232 width=2,197) (actual time=80.474..182,998.211 rows=80,134 loops=1)

  • Hash Cond: (li.adjuster_id = usr.id)
  • Planning time: 1.098 ms
  • Execution time: 183027.092 ms
2.          

Initplan (forHash Left Join)

3. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on bp_accounts (cost=0.00..1.01 rows=1 width=16) (actual time=0.009..0.009 rows=1 loops=1)

  • Filter: ((subdomain)::text = 'experian'::text)
4. 152.739 442.553 ↓ 1.1 80,134 1

Hash Join (cost=1,144.19..25,931.99 rows=75,232 width=1,973) (actual time=9.484..442.553 rows=80,134 loops=1)

  • Hash Cond: (li.invoice_id = inv.id)
5. 280.405 280.405 ↓ 1.0 81,483 1

Seq Scan on invoice_line_items li (cost=0.00..23,729.97 rows=81,467 width=1,957) (actual time=0.040..280.405 rows=81,483 loops=1)

  • Filter: ((deleted_at IS NULL) AND (client_account_id = $0))
  • Rows Removed by Filter: 8915
6. 1.892 9.409 ↑ 1.0 9,435 1

Hash (cost=1,026.26..1,026.26 rows=9,435 width=32) (actual time=9.409..9.409 rows=9,435 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 718kB
7. 7.517 7.517 ↑ 1.0 9,435 1

Seq Scan on invoices inv (cost=0.00..1,026.26 rows=9,435 width=32) (actual time=0.013..7.517 rows=9,435 loops=1)

  • Filter: ((state)::text <> ALL ('{failed,draft,sending,submitting}'::text[]))
  • Rows Removed by Filter: 782
8. 3.244 65.822 ↓ 12.1 13,801 1

Hash (cost=144.11..144.11 rows=1,137 width=48) (actual time=65.822..65.822 rows=13,801 loops=1)

  • Buckets: 16384 (originally 2048) Batches: 1 (originally 1) Memory Usage: 1141kB
9. 62.578 62.578 ↓ 12.1 13,801 1

Foreign Scan on users usr (cost=100.00..144.11 rows=1,137 width=48) (actual time=1.253..62.578 rows=13,801 loops=1)