explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IgAZ

Settings
# exclusive inclusive rows x rows loops node
1. 17.150 22,983.022 ↑ 1.2 15,333 1

Subquery Scan on dbout_history_atv_floorspace_es (cost=15,447.66..15,678.61 rows=18,476 width=6,221) (actual time=22,965.084..22,983.022 rows=15,333 loops=1)

2. 348.317 22,965.872 ↑ 1.2 15,333 1

Sort (cost=15,447.66..15,493.85 rows=18,476 width=437) (actual time=22,965.075..22,965.872 rows=15,333 loops=1)

  • Sort Key: history.hty_id, task.tsk_id, historyvalue.acs_id, historyvalue.ite_id
  • Sort Method: quicksort Memory: 14804kB
3. 19,515.026 22,617.555 ↑ 1.2 15,333 1

Hash Join (cost=2,983.44..14,138.32 rows=18,476 width=437) (actual time=2,077.176..22,617.555 rows=15,333 loops=1)

  • Hash Cond: (history.tsk_id = task.tsk_id)
4. 1,000.983 3,097.337 ↑ 1.2 15,333 1

GroupAggregate (cost=2,647.97..4,818.90 rows=18,476 width=105) (actual time=2,071.102..3,097.337 rows=15,333 loops=1)

5. 1,550.872 2,096.354 ↓ 9.4 174,547 1

Sort (cost=2,647.97..2,694.16 rows=18,476 width=105) (actual time=2,068.093..2,096.354 rows=174,547 loops=1)

  • Sort Key: history.hty_id, history.tsk_id, history.act_id, history.hty_initialdatehour, history.hty_finaldatehour, history.hty_status, history.hty_syncdatehour, history.hty_approvalstatus, historyvalue.acs_id, historyvalue.ite_id, historyvalue.htv_executiongroup
  • Sort Method: quicksort Memory: 41991kB
6. 57.360 545.482 ↓ 9.4 174,547 1

Hash Join (cost=16.20..1,338.63 rows=18,476 width=105) (actual time=0.409..545.482 rows=174,547 loops=1)

  • Hash Cond: (historyvalue.acf_id = activityfield.acf_id)
7. 44.648 487.907 ↓ 9.4 174,547 1

Nested Loop (cost=0.98..1,069.38 rows=18,476 width=100) (actual time=0.165..487.907 rows=174,547 loops=1)

8. 0.490 2.599 ↓ 2.6 220 1

Nested Loop (cost=0.56..93.02 rows=85 width=52) (actual time=0.123..2.599 rows=220 loops=1)

9. 0.789 0.789 ↓ 2.6 220 1

Index Scan using history_hty_finaldatehour_in on history (cost=0.28..22.46 rows=85 width=52) (actual time=0.059..0.789 rows=220 loops=1)

  • Index Cond: (hty_finaldatehour >= '2019-01-01 00:00:00'::timestamp without time zone)
  • Filter: ((act_id = 473676::bigint) AND (hty_status = '1'::bpchar))
  • Rows Removed by Filter: 351
10. 1.320 1.320 ↑ 1.0 1 220

Index Only Scan using task_pk on task task_1 (cost=0.28..0.82 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=220)

  • Index Cond: (tsk_id = history.tsk_id)
  • Heap Fetches: 116
11. 440.660 440.660 ↓ 3.5 793 220

Index Scan using historyvalue_hty_id_in on historyvalue (cost=0.42..9.23 rows=226 width=56) (actual time=0.025..2.003 rows=793 loops=220)

  • Index Cond: (hty_id = history.hty_id)
12. 0.092 0.215 ↑ 1.0 365 1

Hash (cost=10.65..10.65 rows=365 width=13) (actual time=0.215..0.215 rows=365 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
13. 0.123 0.123 ↑ 1.0 365 1

Seq Scan on activityfield (cost=0.00..10.65 rows=365 width=13) (actual time=0.013..0.123 rows=365 loops=1)

14. 3.403 5.192 ↓ 1.0 6,982 1

Hash (cost=248.54..248.54 rows=6,954 width=299) (actual time=5.192..5.192 rows=6,982 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1363kB
15. 1.789 1.789 ↓ 1.0 6,982 1

Seq Scan on task (cost=0.00..248.54 rows=6,954 width=299) (actual time=0.016..1.789 rows=6,982 loops=1)

Total runtime : 22,989.376 ms