explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5kCz

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 525.690 ↓ 0.0 0 1

GroupAggregate (cost=2,384.81..2,384.83 rows=1 width=16) (actual time=525.683..525.690 rows=0 loops=1)

  • Group Key: job_ads.campaign_id, application_stages.hiring_plan_interview_stage_id
  • Buffers: shared hit=114732
2. 0.038 525.674 ↓ 0.0 0 1

Sort (cost=2,384.81..2,384.82 rows=1 width=8) (actual time=525.666..525.674 rows=0 loops=1)

  • Sort Key: job_ads.campaign_id, application_stages.hiring_plan_interview_stage_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=114732
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=114732
3. 0.016 525.636 ↓ 0.0 0 1

Nested Loop (cost=1,395.41..2,384.80 rows=1 width=8) (actual time=525.628..525.636 rows=0 loops=1)

  • Buffers: shared hit=114729
4. 0.014 525.620 ↓ 0.0 0 1

Nested Loop (cost=1,395.27..2,376.56 rows=1 width=8) (actual time=525.613..525.620 rows=0 loops=1)

  • Buffers: shared hit=114729
5. 0.012 525.606 ↓ 0.0 0 1

Nested Loop (cost=1,394.70..2,367.98 rows=1 width=8) (actual time=525.598..525.606 rows=0 loops=1)

  • Buffers: shared hit=114729
6. 274.800 525.594 ↓ 0.0 0 1

Bitmap Heap Scan on applications (cost=1,394.27..2,359.53 rows=1 width=12) (actual time=525.582..525.594 rows=0 loops=1)

  • Recheck Cond: ((created_at >= '2019-01-01 05:00:00'::timestamp without time zone) AND (created_at <= '2020-01-01 04:59:59.999999'::timestamp without time zone) AND (stage_status_id = ANY ('{2,1}'::integer[])))
  • Filter: (((related_post_type)::text = 'JobAd'::text) AND (hiring_plan_id = ANY ('{518376,1078830,851755,883281,1159383,467034,829803,829804,871473,840238,842465,930153,869730,932647,386214,471954,1029274,883576,863921,870971,380229,947921,700046,467042,437791,884364,878899,884457,884467,884502,884533,604094,452718,380231,381018,477272,471932,471948,478989,554702,1022587,1022769,546727,434584,963909,598358,573332,632803,963929,963932,579874,579880,467029,581803,1002006,638415,522241,389186,579508,638431,945753,599398,922564,997054,742995,693089,693091,704382,670452,666339,467032,678382,998291,962715,962719,962723,961292,982184,951491,806125,999262,1083297,752608,962812,950597,950606,954694,966161,966162,964134,954946,799693,958836,795440,958843,960197,799775,419893,806453,967661,809665,987377,987378,987380,985020,987477,1044488,1044492,1062881,1078800,1068380,1159589,1159641,1159648,1159651}'::integer[])))
  • Rows Removed by Filter: 1075126
  • Heap Blocks: exact=99119
  • Buffers: shared hit=114729
7. 4.859 250.794 ↓ 0.0 0 1

BitmapAnd (cost=1,394.27..1,394.27 rows=240 width=0) (actual time=250.787..250.794 rows=0 loops=1)

  • Buffers: shared hit=15610
8. 86.840 86.840 ↓ 45.6 1,096,910 1

Bitmap Index Scan on index_applications_on_created_at (cost=0.00..504.72 rows=24,029 width=0) (actual time=86.832..86.840 rows=1,096,910 loops=1)

  • Index Cond: ((created_at >= '2019-01-01 05:00:00'::timestamp without time zone) AND (created_at <= '2020-01-01 04:59:59.999999'::timestamp without time zone))
  • Buffers: shared hit=3000
9. 159.095 159.095 ↓ 96.0 4,613,413 1

Bitmap Index Scan on index_applications_on_stage_status_id (cost=0.00..889.30 rows=48,058 width=0) (actual time=159.087..159.095 rows=4,613,413 loops=1)

  • Index Cond: (stage_status_id = ANY ('{2,1}'::integer[]))
  • Buffers: shared hit=12610
10. 0.000 0.000 ↓ 0.0 0

Index Scan using people_pkey on people (cost=0.43..8.45 rows=1 width=4) (never executed)

  • Index Cond: (id = applications.person_id)
  • Filter: (import_hash IS NULL)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using application_stages_pkey_new on application_stages (cost=0.56..8.58 rows=1 width=8) (never executed)

  • Index Cond: (id = applications.current_application_stage_id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using job_ads_pkey on job_ads (cost=0.14..8.16 rows=1 width=8) (never executed)

  • Index Cond: (id = applications.related_post_id)
Planning time : 61.812 ms
Execution time : 527.488 ms