explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8zkf

Settings
# exclusive inclusive rows x rows loops node
1. 0.620 38,043.991 ↑ 10.1 1,011 1

Unique (cost=5,725.03..22,906,867.49 rows=10,210 width=8) (actual time=35.922..38,043.991 rows=1,011 loops=1)

  • Buffers: shared hit=117017 read=1860
2. 54.051 38,043.371 ↑ 10.1 1,011 1

Group (cost=5,725.03..22,906,841.97 rows=10,210 width=8) (actual time=35.922..38,043.371 rows=1,011 loops=1)

  • Buffers: shared hit=117017 read=1860
3. 70.021 37,989.320 ↓ 13.5 828,515 1

Nested Loop (cost=5,725.03..22,906,536.07 rows=61,180 width=8) (actual time=35.921..37,989.32 rows=828,515 loops=1)

  • Buffers: shared hit=117017 read=1860
4. 5.763 37,729.525 ↓ 1.4 7,299 1

Nested Loop (cost=5,724.61..22,894,960.55 rows=5,104 width=8) (actual time=35.893..37,729.525 rows=7,299 loops=1)

  • Buffers: shared hit=15942 read=1574
5. 6.327 37,723.762 ↓ 1.4 7,299 1

Merge Join (cost=5,724.61..22,894,895.62 rows=5,104 width=12) (actual time=35.874..37,723.762 rows=7,299 loops=1)

  • Buffers: shared hit=15942 read=1573
6. 0.000 37,711.512 ↓ 1.4 7,299 1

Gather Merge (cost=5,724.32..22,894,137.09 rows=5,104 width=16) (actual time=35.832..37,711.512 rows=7,299 loops=1)

  • Buffers: shared hit=5931768 read=2478
7. 13.942 38,974.418 ↓ 1.2 3,650 2

Nested Loop (cost=4,724.31..22,892,562.88 rows=3,002 width=16) (actual time=33.568..19,487.209 rows=3,650 loops=2)

  • Buffers: shared hit=5931768 read=2478
8. 8.586 38.034 ↑ 1.7 3,660 2

Merge Join (cost=4,724.02..4,898.09 rows=6,082 width=12) (actual time=11.76..19.017 rows=3,660 loops=2)

  • Buffers: shared hit=157 read=1031
9. 6.600 15.972 ↑ 1.2 7,424 2

Sort (cost=3,381.22..3,403.57 rows=8,938 width=4) (actual time=6.209..7.986 rows=7,424 loops=2)

  • Sort Key: t4.startup_id
  • Sort Method: quicksort Memory: 823kB
  • Buffers: shared hit=34 read=912
10. 8.363 9.372 ↑ 1.2 7,424 2

Bitmap Heap Scan on cse_cse t4 (cost=294.35..2,794.63 rows=8,938 width=4) (actual time=0.579..4.686 rows=7,424 loops=2)

  • Buffers: shared hit=30 read=912
11. 1.009 1.009 ↑ 1.0 14,849 1

Bitmap Index Scan on cse_cse_corporate_id_f8aed316 (cost=0..290.55 rows=15,195 width=0) (actual time=1.009..1.009 rows=14,849 loops=1)

  • Index Cond: (t4.corporate_id = ANY ('{20112,20120,20113,20117,20119,20121,20115,20111,20118,20116,20114}'::integer[]))
  • Buffers: shared hit=30 read=44
12. 8.436 13.476 ↑ 1.1 12,644 2

Sort (cost=1,342.8..1,377.09 rows=13,716 width=8) (actual time=5.533..6.738 rows=12,644 loops=2)

  • Sort Key: generic_startup_entities.startup_id
  • Sort Method: quicksort Memory: 1027kB
  • Buffers: shared hit=123 read=119
13. 5.040 5.040 ↑ 1.0 13,716 2

Seq Scan on generic_startup_entities generic_startup_entities (cost=0..400.26 rows=13,716 width=8) (actual time=0.014..2.52 rows=13,716 loops=2)

  • Filter: (generic_startup_entities.entity_id = 3)
  • Buffers: shared hit=123 read=119
14. 878.280 38,922.442 ↑ 1.0 1 7,319

Index Only Scan using generic_startup_pkey on generic_startup generic_startup (cost=0.29..3,763.18 rows=1 width=4) (actual time=5.318..5.318 rows=1 loops=7,319)

  • Index Cond: (generic_startup.company_ptr_id = t4.startup_id)
  • Filter: (NOT (SubPlan 1))
  • Buffers: shared hit=5931611 read=1447
15.          

SubPlan (forIndex Only Scan)

16. 617.162 38,044.162 ↑ 124.3 1,966 7,319

Materialize (cost=0..6,913.05 rows=244,398 width=4) (actual time=0.001..5.198 rows=1,966 loops=7,319)

  • Buffers: shared hit=5909665 read=1418
17. 37,427.000 37,427.000 ↑ 124.7 1,960 2,600

Seq Scan on cse_cse u1 (cost=0..4,736.06 rows=244,398 width=4) (actual time=0.004..14.395 rows=1,960 loops=2,600)

  • Filter: (NOT u1.valid)
  • Buffers: shared hit=5909665 read=1418
18. 5.923 5.923 ↑ 1.1 18,761 1

Index Only Scan using generic_company_pkey on generic_company generic_company (cost=0.29..642.81 rows=20,766 width=4) (actual time=0.028..5.923 rows=18,761 loops=1)

  • Buffers: shared hit=132 read=107
19. 0.000 0.000 ↑ 1.0 1 7,299

Materialize (cost=0..1.13 rows=1 width=4) (actual time=0..0 rows=1 loops=7,299)

  • Buffers: shared read=1
20. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on generic_entity u0 (cost=0..1.12 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: (u0.id = 3)
  • Buffers: shared read=1
21. 189.774 189.774 ↓ 4.6 114 7,299

Index Only Scan using cse_cse_startup_id_ce15fe02 on cse_cse cse_cse (cost=0.42..2.02 rows=25 width=4) (actual time=0.006..0.026 rows=114 loops=7,299)

  • Index Cond: (cse_cse.startup_id = generic_startup.company_ptr_id)
  • Buffers: shared hit=101075 read=286