explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 21FBE

Settings
# exclusive inclusive rows x rows loops node
1. 145.734 956.447 ↓ 1.3 1,542 1

Hash Left Join (cost=147.17..64,310.64 rows=1,183 width=643) (actual time=15.854..956.447 rows=1,542 loops=1)

  • Hash Cond: (d.publisher_organisation_id = oef.organisation_id)
2.          

CTE live_orgs

3. 0.034 0.045 ↓ 8.5 93 1

Bitmap Heap Scan on organisation_extended_funcs (cost=4.37..15.04 rows=11 width=4) (actual time=0.018..0.045 rows=93 loops=1)

  • Recheck Cond: (extended_function_id = 14)
  • Heap Blocks: exact=3
4. 0.011 0.011 ↓ 8.5 93 1

Bitmap Index Scan on organisation_extended_funcs_pkey (cost=0.00..4.36 rows=11 width=0) (actual time=0.011..0.011 rows=93 loops=1)

  • Index Cond: (extended_function_id = 14)
5. 0.575 810.346 ↓ 5.7 601 1

Hash Join (cost=71.29..59,434.12 rows=106 width=431) (actual time=15.155..810.346 rows=601 loops=1)

  • Hash Cond: (d.impact_score = ei.impact_score)
6. 1.154 809.760 ↓ 5.7 601 1

Nested Loop (cost=53.64..59,416.19 rows=106 width=343) (actual time=15.138..809.760 rows=601 loops=1)

7. 2.385 807.404 ↓ 5.7 601 1

Hash Join (cost=53.36..58,825.71 rows=106 width=321) (actual time=15.131..807.404 rows=601 loops=1)

  • Hash Cond: (d.publisher_organisation_id = live_orgs.organisation_id)
8. 5.121 804.897 ↓ 4.0 7,912 1

Hash Join (cost=53.00..58,816.94 rows=1,961 width=321) (actual time=0.853..804.897 rows=7,912 loops=1)

  • Hash Cond: (d.publisher_orgref = publisher.swa_org_ref)
9. 4.022 798.957 ↓ 4.0 7,912 1

Nested Loop (cost=0.55..58,759.33 rows=1,961 width=299) (actual time=0.027..798.957 rows=7,912 loops=1)

10. 0.033 0.033 ↓ 31.0 31 1

Seq Scan on entity_category ecat (cost=0.00..10.50 rows=1 width=118) (actual time=0.004..0.033 rows=31 loops=1)

  • Filter: ((entitygroupid)::text = 'RW'::text)
  • Rows Removed by Filter: 61
11. 794.902 794.902 ↑ 7.7 255 31

Index Scan using idx_entity_category on entity d (cost=0.55..58,729.22 rows=1,961 width=307) (actual time=0.570..25.642 rows=255 loops=31)

  • Index Cond: ((entity_category)::text = (ecat.nsa_code)::text)
  • Filter: (active AND (tm__entity_id_sw_xref IS NULL) AND (entity_type > 1) AND (published = 1) AND (end_date >= LOCALTIMESTAMP) AND (LOCALTIMESTAMP > publish_date) AND (end_date >= (CURRENT_DATE)::timestamp without time zone) AND (start_date <= ((CURRENT_DATE + '1 day'::interval) - '00:00:01'::interval)))
  • Rows Removed by Filter: 24953
12. 0.394 0.819 ↑ 1.0 1,309 1

Hash (cost=36.09..36.09 rows=1,309 width=26) (actual time=0.819..0.819 rows=1,309 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 82kB
13. 0.425 0.425 ↑ 1.0 1,309 1

Seq Scan on orgref publisher (cost=0.00..36.09 rows=1,309 width=26) (actual time=0.002..0.425 rows=1,309 loops=1)

14. 0.028 0.122 ↓ 8.5 93 1

Hash (cost=0.22..0.22 rows=11 width=4) (actual time=0.122..0.122 rows=93 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
15. 0.094 0.094 ↓ 8.5 93 1

CTE Scan on live_orgs (cost=0.00..0.22 rows=11 width=4) (actual time=0.020..0.094 rows=93 loops=1)

16. 1.202 1.202 ↑ 1.0 1 601

Index Scan using pk_orgref on orgref resporg (cost=0.28..5.57 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=601)

  • Index Cond: (swa_org_ref = d.responsible_org_orgref)
17. 0.005 0.011 ↑ 68.0 5 1

Hash (cost=13.40..13.40 rows=340 width=92) (actual time=0.011..0.011 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.006 0.006 ↑ 68.0 5 1

Seq Scan on eton_impact ei (cost=0.00..13.40 rows=340 width=92) (actual time=0.004..0.006 rows=5 loops=1)

19. 0.185 0.367 ↑ 5.2 437 1

Hash (cost=32.60..32.60 rows=2,260 width=8) (actual time=0.367..0.367 rows=437 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 50kB
20. 0.182 0.182 ↑ 5.2 437 1

Seq Scan on organisation_extended_funcs oef (cost=0.00..32.60 rows=2,260 width=8) (actual time=0.003..0.182 rows=437 loops=1)