explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8fNN : tester

Settings
# exclusive inclusive rows x rows loops node
1. 46,919.231 88,709.033 ↓ 206.3 9,903,673 1

Hash Join (cost=53.45..9,604.63 rows=47,997 width=762) (actual time=1.291..88,709.033 rows=9,903,673 loops=1)

  • Hash Cond: ((account.customer)::text = (customer.customer)::text)
2.          

CTE parent

3. 0.166 0.166 ↓ 201.0 201 1

Seq Scan on service service_1 (cost=0.00..18.00 rows=1 width=38) (actual time=0.004..0.166 rows=201 loops=1)

  • Filter: ((parent_code)::text = (service_code)::text)
  • Rows Removed by Filter: 39
4. 6,920.435 41,789.671 ↓ 206.3 9,903,673 1

Hash Join (cost=29.42..8,611.99 rows=47,997 width=486) (actual time=1.128..41,789.671 rows=9,903,673 loops=1)

  • Hash Cond: ((charge.account_code)::text = (account.account_code)::text)
5. 5,050.871 34,868.655 ↓ 206.3 9,903,673 1

Nested Loop (cost=0.61..8,456.48 rows=47,997 width=334) (actual time=0.523..34,868.655 rows=9,903,673 loops=1)

6. 0.573 2.824 ↓ 240.0 240 1

Nested Loop (cost=0.18..18.71 rows=1 width=161) (actual time=0.505..2.824 rows=240 loops=1)

7. 0.423 1.051 ↓ 240.0 240 1

Hash Join (cost=0.03..18.34 rows=1 width=99) (actual time=0.491..1.051 rows=240 loops=1)

  • Hash Cond: ((service.parent_code)::text = (parent.parent_code)::text)
8. 0.153 0.153 ↑ 1.0 240 1

Seq Scan on service (cost=0.00..17.40 rows=240 width=73) (actual time=0.002..0.153 rows=240 loops=1)

9. 0.136 0.475 ↓ 201.0 201 1

Hash (cost=0.02..0.02 rows=1 width=130) (actual time=0.474..0.475 rows=201 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 25kB
10. 0.339 0.339 ↓ 201.0 201 1

CTE Scan on parent (cost=0.00..0.02 rows=1 width=130) (actual time=0.006..0.339 rows=201 loops=1)

11. 1.200 1.200 ↑ 1.0 1 240

Index Scan using servicesubgroup_pkey on service_subgroup (cost=0.15..0.36 rows=1 width=140) (actual time=0.005..0.005 rows=1 loops=240)

  • Index Cond: ((service_subgroup)::text = (service.service_subgroup)::text)
12. 29,814.960 29,814.960 ↑ 1.8 41,265 240

Index Scan using charge_service_code on charge (cost=0.43..7,689.91 rows=74,786 width=179) (actual time=0.344..124.229 rows=41,265 loops=240)

  • Index Cond: ((service_code)::text = (service.service_code)::text)
13. 0.309 0.581 ↓ 1.0 777 1

Hash (cost=19.47..19.47 rows=747 width=161) (actual time=0.580..0.581 rows=777 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 65kB
14. 0.272 0.272 ↓ 1.0 777 1

Seq Scan on account (cost=0.00..19.47 rows=747 width=161) (actual time=0.005..0.272 rows=777 loops=1)

15. 0.073 0.131 ↑ 1.0 179 1

Hash (cost=3.79..3.79 rows=179 width=174) (actual time=0.131..0.131 rows=179 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
16. 0.058 0.058 ↑ 1.0 179 1

Seq Scan on customer (cost=0.00..3.79 rows=179 width=174) (actual time=0.008..0.058 rows=179 loops=1)