explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K42N

Settings
# exclusive inclusive rows x rows loops node
1. 44.546 101.874 ↓ 1.0 9,018 1

Sort (cost=5,217.92..5,240.17 rows=8,899 width=200) (actual time=100.819..101.874 rows=9,018 loops=1)

  • Sort Key: ga.gl_group_type_id, gat.formatted_account_number
  • Sort Method: quicksort Memory: 2,781kB
  • Buffers: shared hit=2,192
2. 41.915 57.328 ↓ 1.0 9,018 1

Hash Join (cost=754.17..4,634.17 rows=8,899 width=200) (actual time=5.040..57.328 rows=9,018 loops=1)

  • Hash Cond: (ga.gl_group_type_id = glgt.id)
  • Buffers: shared hit=2,186
3. 4.267 13.745 ↓ 1.0 9,018 1

Hash Join (cost=750.46..2,105.37 rows=8,899 width=394) (actual time=3.353..13.745 rows=9,018 loops=1)

  • Hash Cond: (gat.gl_account_id = ga.id)
  • Buffers: shared hit=2,041
4. 2.624 6.178 ↓ 1.0 9,018 1

Nested Loop (cost=0.29..1,331.81 rows=8,899 width=274) (actual time=0.023..6.178 rows=9,018 loops=1)

  • Buffers: shared hit=1,877
5. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on gl_trees gt (cost=0.00..1.15 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: ((cid = 15,573) AND (is_system = 1) AND ((system_code)::text = 'DEFAULT'::text))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
6. 3.547 3.547 ↓ 1.0 9,018 1

Index Scan using uk_gl_account_trees_gl_account_id on gl_account_trees gat (cost=0.29..1,063.69 rows=8,899 width=278) (actual time=0.014..3.547 rows=9,018 loops=1)

  • Index Cond: ((cid = 15,573) AND (gl_tree_id = gt.id))
  • Buffers: shared hit=1,876
7. 1.099 3.300 ↑ 1.0 9,018 1

Hash (cost=457.09..457.09 rows=9,018 width=128) (actual time=3.300..3.300 rows=9,018 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,457kB
  • Buffers: shared hit=164
8. 2.201 2.201 ↑ 1.0 9,018 1

Seq Scan on gl_accounts ga (cost=0.00..457.09 rows=9,018 width=128) (actual time=0.011..2.201 rows=9,018 loops=1)

  • Filter: ((disabled_on IS NULL) AND (cid = 15,573))
  • Buffers: shared hit=164
9. 0.004 1.668 ↑ 1.0 5 1

Hash (cost=3.55..3.55 rows=5 width=36) (actual time=1.668..1.668 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=145
10. 0.003 1.664 ↑ 1.0 5 1

Subquery Scan on glgt (cost=0.00..3.55 rows=5 width=36) (actual time=1.179..1.664 rows=5 loops=1)

  • Buffers: shared hit=145
11. 1.661 1.661 ↑ 1.0 5 1

Seq Scan on gl_group_types (cost=0.00..3.40 rows=5 width=36) (actual time=1.178..1.661 rows=5 loops=1)

  • Buffers: shared hit=145
Planning time : 1.689 ms
Execution time : 102.662 ms