explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Efim

Settings
# exclusive inclusive rows x rows loops node
1. 251.908 6,056.512 ↑ 1.2 13,055 1

HashAggregate (cost=288,243.70..288,400.00 rows=15,630 width=19) (actual time=6,051.628..6,056.512 rows=13,055 loops=1)

  • Group Key: gld.field_value
2. 682.829 5,804.604 ↑ 1.0 503,492 1

Hash Left Join (cost=205,138.89..286,984.80 rows=503,561 width=19) (actual time=3,155.354..5,804.604 rows=503,492 loops=1)

  • Hash Cond: (gl.id = gl_1.id)
3. 196.831 3,118.519 ↑ 1.0 503,492 1

Hash Left Join (cost=97,373.22..164,369.75 rows=503,561 width=16) (actual time=1,151.504..3,118.519 rows=503,492 loops=1)

  • Hash Cond: (gl.id = gl_2.id)
4. 637.684 2,892.108 ↑ 1.0 503,492 1

Hash Right Join (cost=75,017.84..140,094.70 rows=503,561 width=16) (actual time=1,121.904..2,892.108 rows=503,492 loops=1)

  • Hash Cond: (gl_3.id = gl.id)
5. 723.447 1,758.921 ↑ 1.0 460,618 1

Hash Join (cost=45,029.71..97,138.74 rows=469,295 width=16) (actual time=626.338..1,758.921 rows=460,618 loops=1)

  • Hash Cond: (gld_2.general_ledger = gl_3.id)
6. 419.810 545.699 ↑ 1.0 460,618 1

Bitmap Heap Scan on general_ledger_details gld_2 (cost=15,041.59..54,182.78 rows=469,295 width=16) (actual time=136.272..545.699 rows=460,618 loops=1)

  • Recheck Cond: ((field_name)::text = 'PATIENT_NAME'::text)
  • Heap Blocks: exact=33135
7. 125.889 125.889 ↑ 1.0 460,618 1

Bitmap Index Scan on idx_field_name_genledger (cost=0.00..14,924.27 rows=469,295 width=0) (actual time=125.889..125.889 rows=460,618 loops=1)

  • Index Cond: ((field_name)::text = 'PATIENT_NAME'::text)
8. 262.561 489.775 ↑ 1.0 503,492 1

Hash (cost=21,234.61..21,234.61 rows=503,561 width=16) (actual time=489.775..489.775 rows=503,492 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3986kB
9. 227.214 227.214 ↑ 1.0 503,492 1

Seq Scan on general_ledger gl_3 (cost=0.00..21,234.61 rows=503,561 width=16) (actual time=0.023..227.214 rows=503,492 loops=1)

10. 261.450 495.503 ↑ 1.0 503,492 1

Hash (cost=21,234.61..21,234.61 rows=503,561 width=16) (actual time=495.503..495.503 rows=503,492 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3986kB
11. 234.053 234.053 ↑ 1.0 503,492 1

Seq Scan on general_ledger gl (cost=0.00..21,234.61 rows=503,561 width=16) (actual time=0.019..234.053 rows=503,492 loops=1)

12. 0.001 29.580 ↓ 0.0 0 1

Hash (cost=22,316.26..22,316.26 rows=3,130 width=16) (actual time=29.580..29.580 rows=0 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 32kB
13. 29.499 29.579 ↓ 0.0 0 1

Gather (cost=1,105.23..22,316.26 rows=3,130 width=16) (actual time=29.579..29.579 rows=0 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
14. 0.002 0.080 ↓ 0.0 0 2

Nested Loop (cost=105.23..21,003.26 rows=1,841 width=16) (actual time=0.080..0.080 rows=0 loops=2)

15. 0.007 0.078 ↓ 0.0 0 2

Parallel Bitmap Heap Scan on general_ledger_details gld_1 (cost=104.81..9,398.96 rows=1,841 width=16) (actual time=0.078..0.078 rows=0 loops=2)

  • Recheck Cond: ((field_name)::text = 'STATUS'::text)
16. 0.071 0.071 ↓ 0.0 0 1

Bitmap Index Scan on idx_field_name_genledger (cost=0.00..104.03 rows=3,130 width=0) (actual time=0.071..0.071 rows=0 loops=1)

  • Index Cond: ((field_name)::text = 'STATUS'::text)
17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using general_ledger_pkey on general_ledger gl_2 (cost=0.42..6.30 rows=1 width=16) (never executed)

  • Index Cond: (id = gld_1.general_ledger)
  • Heap Fetches: 0
18. 267.232 2,003.256 ↓ 1.0 460,618 1

Hash (cost=98,593.86..98,593.86 rows=451,504 width=35) (actual time=2,003.256..2,003.256 rows=460,618 loops=1)

  • Buckets: 65536 Batches: 16 Memory Usage: 2010kB
19. 672.964 1,736.024 ↓ 1.0 460,618 1

Hash Join (cost=44,459.83..98,593.86 rows=451,504 width=35) (actual time=649.183..1,736.024 rows=460,618 loops=1)

  • Hash Cond: (gld.general_ledger = gl_1.id)
20. 426.710 571.525 ↓ 1.0 460,618 1

Bitmap Heap Scan on general_ledger_details gld (cost=14,471.71..53,390.51 rows=451,504 width=35) (actual time=157.335..571.525 rows=460,618 loops=1)

  • Recheck Cond: ((field_name)::text = 'TRANSACTION_NO'::text)
  • Heap Blocks: exact=33141
21. 144.815 144.815 ↓ 1.0 460,618 1

Bitmap Index Scan on idx_field_name_genledger (cost=0.00..14,358.83 rows=451,504 width=0) (actual time=144.815..144.815 rows=460,618 loops=1)

  • Index Cond: ((field_name)::text = 'TRANSACTION_NO'::text)
22. 263.327 491.535 ↑ 1.0 503,492 1

Hash (cost=21,234.61..21,234.61 rows=503,561 width=16) (actual time=491.535..491.535 rows=503,492 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3986kB
23. 228.208 228.208 ↑ 1.0 503,492 1

Seq Scan on general_ledger gl_1 (cost=0.00..21,234.61 rows=503,561 width=16) (actual time=0.034..228.208 rows=503,492 loops=1)

Planning time : 3.879 ms