explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MjIh

Settings
# exclusive inclusive rows x rows loops node
1. 0.142 42,515.841 ↑ 1.0 500 1

Limit (cost=1,615,457.76..1,615,459.01 rows=500 width=86) (actual time=42,515.628..42,515.841 rows=500 loops=1)

2. 6.452 42,515.699 ↑ 3,836.9 500 1

Sort (cost=1,615,457.76..1,620,253.85 rows=1,918,433 width=86) (actual time=42,515.626..42,515.699 rows=500 loops=1)

  • Sort Key: v.effective_at
  • Sort Method: top-N heapsort Memory: 144kB
3. 733.807 42,509.247 ↑ 106.0 18,099 1

Hash Join (cost=618,092.24..1,519,864.32 rows=1,918,433 width=86) (actual time=38,867.576..42,509.247 rows=18,099 loops=1)

  • Hash Cond: (e.place_description_id = pd.id)
4. 1,538.577 40,125.685 ↑ 106.0 18,099 1

Hash Join (cost=490,434.85..1,324,056.03 rows=1,918,433 width=70) (actual time=35,639.499..40,125.685 rows=18,099 loops=1)

  • Hash Cond: (pt.job_place_description_optimize_properties_id = e.id)
  • Join Filter: (((v.status)::text = 'SCHEDULED'::text) OR (((v.status)::text = 'FAILED'::text) AND ((SubPlan 1) < 3)))
  • Rows Removed by Join Filter: 15
5. 348.013 29,217.283 ↑ 106.0 18,114 1

Gather (cost=223,969.98..966,508.49 rows=1,919,874 width=25) (actual time=17,220.933..29,217.283 rows=18,114 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 4,064.832 28,869.270 ↑ 132.5 6,038 3 / 3

Hash Join (cost=222,969.98..773,521.09 rows=799,948 width=25) (actual time=20,253.515..28,869.270 rows=6,038 loops=3)

  • Hash Cond: (v.id = pt.job_place_description_optimize_properties_version_id)
7. 10,308.839 10,308.839 ↑ 1.4 1,747,294 3 / 3

Parallel Seq Scan on job_place_description_optimize_properties_version v (cost=0.00..453,319.63 rows=2,482,101 width=25) (actual time=0.007..10,308.839 rows=1,747,294 loops=3)

  • Filter: (((status)::text = 'SCHEDULED'::text) OR ((status)::text = 'FAILED'::text))
  • Rows Removed by Filter: 4,593,976
8. 11,515.995 14,495.599 ↑ 1.0 6,117,634 3 / 3

Hash (cost=114,479.99..114,479.99 rows=6,241,199 width=16) (actual time=14,495.599..14,495.599 rows=6,117,634 loops=3)

  • Buckets: 131,072 Batches: 128 Memory Usage: 3,258kB
9. 2,979.604 2,979.604 ↑ 1.0 6,117,634 3 / 3

Seq Scan on job_pdop_current_version_pointer pt (cost=0.00..114,479.99 rows=6,241,199 width=16) (actual time=0.011..2,979.604 rows=6,117,634 loops=3)

10. 6,256.705 9,238.592 ↑ 1.0 6,117,634 1

Hash (cost=130,137.50..130,137.50 rows=6,122,750 width=53) (actual time=9,238.592..9,238.592 rows=6,117,634 loops=1)

  • Buckets: 65,536 Batches: 256 Memory Usage: 2,505kB
11. 2,981.887 2,981.887 ↑ 1.0 6,117,634 1

Seq Scan on job_place_description_optimize_properties e (cost=0.00..130,137.50 rows=6,122,750 width=53) (actual time=0.009..2,981.887 rows=6,117,634 loops=1)

12.          

SubPlan (for Hash Join)

13. 0.171 131.233 ↑ 1.0 1 19

Aggregate (cost=22.62..22.63 rows=1 width=8) (actual time=6.907..6.907 rows=1 loops=19)

14. 131.062 131.062 ↓ 27.0 27 19

Index Scan using job_place_description_optimize_properties_version_ux1 on job_place_description_optimize_properties_version ssv (cost=0.56..22.62 rows=1 width=0) (actual time=6.469..6.898 rows=27 loops=19)

  • Index Cond: (job_place_description_optimize_properties_id = e.id)
  • Filter: ((status)::text = 'FAILED'::text)
  • Rows Removed by Filter: 34
15. 940.476 1,649.755 ↑ 1.0 3,048,149 1

Hash (cost=70,785.06..70,785.06 rows=3,097,706 width=24) (actual time=1,649.755..1,649.755 rows=3,048,149 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 3,123kB
16. 709.279 709.279 ↑ 1.0 3,048,149 1

Seq Scan on place_description pd (cost=0.00..70,785.06 rows=3,097,706 width=24) (actual time=0.005..709.279 rows=3,048,149 loops=1)

Planning time : 1.513 ms
Execution time : 42,517.334 ms