explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aagK

Settings
# exclusive inclusive rows x rows loops node
1. 89.114 165.188 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,573.60 rows=3 width=479) (actual time=14.955..165.188 rows=1,006 loops=1)

  • Join Filter: false
2. 0.975 76.074 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.34 rows=3 width=1,613) (actual time=14.600..76.074 rows=1,006 loops=1)

  • Join Filter: false
3. 1.042 75.099 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.31 rows=3 width=1,603) (actual time=14.599..75.099 rows=1,006 loops=1)

  • Join Filter: false
4. 0.966 74.057 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.28 rows=3 width=1,593) (actual time=14.597..74.057 rows=1,006 loops=1)

  • Join Filter: false
5. 0.953 73.091 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.25 rows=3 width=1,558) (actual time=14.596..73.091 rows=1,006 loops=1)

  • Join Filter: false
6. 0.984 72.138 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.22 rows=3 width=1,550) (actual time=14.595..72.138 rows=1,006 loops=1)

  • Join Filter: false
7. 0.964 71.154 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.19 rows=3 width=1,550) (actual time=14.593..71.154 rows=1,006 loops=1)

  • Join Filter: false
8. 0.972 70.190 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.16 rows=3 width=1,546) (actual time=14.592..70.190 rows=1,006 loops=1)

  • Join Filter: false
9. 0.921 69.218 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.13 rows=3 width=1,509) (actual time=14.591..69.218 rows=1,006 loops=1)

  • Join Filter: false
10. 0.929 68.297 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.10 rows=3 width=1,306) (actual time=14.589..68.297 rows=1,006 loops=1)

  • Join Filter: false
11. 0.957 67.368 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.07 rows=3 width=1,137) (actual time=14.588..67.368 rows=1,006 loops=1)

  • Join Filter: false
12. 0.951 66.411 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.04 rows=3 width=1,113) (actual time=14.587..66.411 rows=1,006 loops=1)

  • Join Filter: false
13. 1.081 65.460 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,563.01 rows=3 width=1,089) (actual time=14.585..65.460 rows=1,006 loops=1)

  • Join Filter: false
14. 0.893 64.379 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.99..4,562.98 rows=3 width=1,085) (actual time=14.583..64.379 rows=1,006 loops=1)

15. 2.418 60.468 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.57..4,561.28 rows=3 width=1,033) (actual time=14.571..60.468 rows=1,006 loops=1)

16. 1.796 54.026 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=294.15..4,537.19 rows=3 width=984) (actual time=14.547..54.026 rows=1,006 loops=1)

17. 2.444 50.218 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=293.86..4,536.21 rows=3 width=698) (actual time=14.531..50.218 rows=1,006 loops=1)

  • Join Filter: (gh.cid = art1.cid)
18. 3.820 43.750 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=293.43..4,527.93 rows=3 width=494) (actual time=14.517..43.750 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{7,8,9,17}'::integer[]))
  • Rows Removed by Join Filter: 382
19. 1.679 30.876 ↓ 335.3 1,006 1

Nested Loop Left Join (cost=56.85..3,806.07 rows=3 width=478) (actual time=14.490..30.876 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = ANY ('{13,14,18,23,24}'::integer[]))
20. 8.355 24.167 ↓ 335.3 1,006 1

Nested Loop (cost=56.41..3,793.52 rows=3 width=470) (actual time=14.472..24.167 rows=1,006 loops=1)

  • Join Filter: (gh.gl_transaction_type_id = gtty.id)
  • Rows Removed by Join Filter: 26156
21. 0.044 0.044 ↑ 1.0 27 1

Index Scan using pk_gl_transaction_types on gl_transaction_types gtty (cost=0.14..20.65 rows=27 width=24) (actual time=0.011..0.044 rows=27 loops=1)

22. 4.943 15.768 ↓ 335.3 1,006 27

Materialize (cost=56.28..3,771.66 rows=3 width=446) (actual time=0.055..0.584 rows=1,006 loops=27)

23. 0.528 10.825 ↓ 335.3 1,006 1

Nested Loop (cost=56.28..3,771.65 rows=3 width=446) (actual time=1.463..10.825 rows=1,006 loops=1)

24. 0.019 0.019 ↑ 1.0 1 1

Index Scan using idx_properties_id on properties p (cost=0.28..8.30 rows=1 width=33) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (id = 2458)
  • Filter: (cid = 224)
25. 1.744 10.278 ↓ 335.3 1,006 1

Nested Loop (cost=56.00..3,763.32 rows=3 width=421) (actual time=1.442..10.278 rows=1,006 loops=1)

26. 1.173 4.510 ↓ 3.6 1,006 1

Hash Join (cost=55.56..1,380.67 rows=282 width=325) (actual time=1.414..4.510 rows=1,006 loops=1)

  • Hash Cond: (gd.accrual_gl_account_id = gat.gl_account_id)
27. 1.985 1.985 ↓ 3.4 1,016 1

Index Scan using idx_gl_details_cid_property_id_post_month_lease_id_reference_id on gl_details gd (cost=0.56..1,321.73 rows=299 width=73) (actual time=0.038..1.985 rows=1,016 loops=1)

  • Index Cond: ((cid = 224) AND (property_id = 2458) AND (post_month >= '2019-06-01'::date) AND (post_month <= '2019-06-01'::date) AND (gl_transaction_type_id = ANY ('{13,14,18,23,24,7,8,9,17}'::integer[])))
28. 0.559 1.352 ↑ 1.0 1,160 1

Hash (cost=40.50..40.50 rows=1,160 width=264) (actual time=1.352..1.352 rows=1,160 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 114kB
29. 0.793 0.793 ↑ 1.0 1,160 1

Seq Scan on gat_temp gat (cost=0.00..40.50 rows=1,160 width=264) (actual time=0.011..0.793 rows=1,160 loops=1)

  • Filter: (cid = 224)
30. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using idx_gl_headers_id on gl_headers gh (cost=0.43..8.45 rows=1 width=100) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: (id = gd.gl_header_id)
  • Filter: ((NOT is_template) AND (cid = 224) AND (gl_book_id = 132) AND (gl_header_status_type_id <> ALL ('{2,4,5,6}'::integer[])))
31. 5.030 5.030 ↓ 0.0 0 1,006

Index Scan using pk_ar_allocations on ar_allocations ara (cost=0.43..4.17 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=1,006)

  • Index Cond: ((cid = gh.cid) AND (cid = 224) AND (id = gh.reference_id))
32. 2.012 9.054 ↑ 1.0 1 1,006

Bitmap Heap Scan on ar_transactions art (cost=236.59..240.61 rows=1 width=20) (actual time=0.009..0.009 rows=1 loops=1,006)

  • Recheck Cond: (((cid = 224) AND (id = gh.reference_id)) OR ((cid = 224) AND (id = ara.credit_ar_transaction_id)))
  • Filter: (gh.cid = cid)
  • Heap Blocks: exact=1006
33. 2.012 7.042 ↓ 0.0 0 1,006

BitmapOr (cost=236.59..236.59 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1,006)

34. 4.024 4.024 ↑ 1.0 1 1,006

Bitmap Index Scan on pk_ar_transactions (cost=0.00..1.37 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = gh.reference_id))
35. 1.006 1.006 ↓ 0.0 0 1,006

Bitmap Index Scan on pk_ar_transactions (cost=0.00..0.67 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = ara.credit_ar_transaction_id))
36. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using pk_ar_transactions on ar_transactions art1 (cost=0.43..2.75 rows=1 width=212) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = 224) AND (id = COALESCE(ara.charge_ar_transaction_id, art.id)))
37. 2.012 2.012 ↑ 1.0 1 1,006

Index Scan using idx_ar_codes on ar_codes ac (cost=0.29..0.31 rows=1 width=302) (actual time=0.002..0.002 rows=1 loops=1,006)

  • Index Cond: (id = art.ar_code_id)
  • Filter: ((cid = 224) AND (cid = art.cid))
38. 4.024 4.024 ↑ 1.0 1 1,006

Index Scan using pk_cached_leases on cached_leases cl (cost=0.42..8.03 rows=1 width=61) (actual time=0.004..0.004 rows=1 loops=1,006)

  • Index Cond: ((cid = gd.cid) AND (cid = 224) AND (id = gd.lease_id))
39. 3.018 3.018 ↓ 0.0 0 1,006

Index Scan using idx_ar_deposits_id on ar_deposits ard (cost=0.42..0.56 rows=1 width=68) (actual time=0.003..0.003 rows=0 loops=1,006)

  • Index Cond: (gh.reference_id = id)
  • Filter: ((cid = 224) AND (gh.cid = cid) AND (gh.gl_transaction_type_id = gl_transaction_type_id))
40. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=4) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
41. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=24) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
42. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=32) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
43. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=169) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
44. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=203) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
45. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=37) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
46. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=4) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
47. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
48. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=8) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
49. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=35) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
50. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=10) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
51. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=10) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false
52. 0.000 0.000 ↓ 0.0 0 1,006

Result (cost=0.00..0.00 rows=0 width=27) (actual time=0.000..0.000 rows=0 loops=1,006)

  • One-Time Filter: false