explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qnyN

Settings
# exclusive inclusive rows x rows loops node
1. 906.273 1,805.236 ↑ 2.5 8,852 1

Hash Left Join (cost=199.35..147,562.35 rows=21,828 width=643) (actual time=2.300..1,805.236 rows=8,852 loops=1)

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

CTE live_orgs

3. 0.033 0.044 ↓ 8.5 93 1

Bitmap Heap Scan on organisation_extended_funcs (cost=4.37..15.04 rows=11 width=4) (actual time=0.017..0.044 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. 6.757 898.727 ↓ 4.0 7,911 1

Hash Left Join (cost=123.46..58,906.19 rows=1,961 width=431) (actual time=1.788..898.727 rows=7,911 loops=1)

  • Hash Cond: (d.publisher_organisation_id = live_orgs.organisation_id)
6. 6.655 891.851 ↓ 4.0 7,911 1

Hash Join (cost=123.11..58,897.42 rows=1,961 width=431) (actual time=1.665..891.851 rows=7,911 loops=1)

  • Hash Cond: (d.impact_score = ei.impact_score)
7. 6.548 885.185 ↓ 4.0 7,911 1

Hash Join (cost=105.45..58,874.55 rows=1,961 width=343) (actual time=1.649..885.185 rows=7,911 loops=1)

  • Hash Cond: (d.responsible_org_orgref = resporg.swa_org_ref)
8. 8.360 877.817 ↓ 4.0 7,912 1

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

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

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

10. 0.034 0.034 ↓ 31.0 31 1

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

  • Filter: ((entitygroupid)::text = 'RW'::text)
  • Rows Removed by Filter: 61
11. 863.040 863.040 ↑ 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.577..27.840 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.392 0.787 ↑ 1.0 1,309 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 82kB
13. 0.395 0.395 ↑ 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.395 rows=1,309 loops=1)

14. 0.390 0.820 ↑ 1.0 1,309 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 82kB
15. 0.430 0.430 ↑ 1.0 1,309 1

Seq Scan on orgref resporg (cost=0.00..36.09 rows=1,309 width=26) (actual time=0.003..0.430 rows=1,309 loops=1)

16. 0.005 0.011 ↑ 68.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 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)

18. 0.027 0.119 ↓ 8.5 93 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
19. 0.092 0.092 ↓ 8.5 93 1

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

20. 0.123 0.236 ↑ 5.2 437 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 50kB
21. 0.113 0.113 ↑ 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.113 rows=437 loops=1)