explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SWSM : EXISTS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,102.139 ↑ 1.0 8 1

Finalize GroupAggregate (cost=92,757.74..92,758.78 rows=8 width=16) (actual time=1,102.129..1,102.139 rows=8 loops=1)

  • Group Key: smartq_jobs_log.status
2. 43.890 1,124.999 ↓ 2.0 16 1

Gather Merge (cost=92,757.74..92,758.66 rows=8 width=16) (actual time=1,102.116..1,124.999 rows=16 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 0.043 1,081.109 ↑ 1.0 8 2 / 2

Sort (cost=91,757.73..91,757.75 rows=8 width=16) (actual time=1,081.107..1,081.109 rows=8 loops=2)

  • Sort Key: smartq_jobs_log.status
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
4. 17.050 1,081.066 ↑ 1.0 8 2 / 2

Partial HashAggregate (cost=91,757.53..91,757.61 rows=8 width=16) (actual time=1,081.063..1,081.066 rows=8 loops=2)

  • Group Key: smartq_jobs_log.status
5. 21.190 1,064.016 ↑ 1.3 37,026 2 / 2

Nested Loop (cost=0.86..91,510.36 rows=49,433 width=16) (actual time=0.240..1,064.016 rows=37,026 loops=2)

6. 6.098 6.098 ↑ 1.3 9,257 2 / 2

Parallel Index Only Scan using idx_sj_user_id_cur_status on smartq_jobs (cost=0.43..753.57 rows=12,358 width=8) (actual time=0.124..6.098 rows=9,257 loops=2)

  • Index Cond: (user_id = 108)
  • Heap Fetches: 0
7. 1,036.728 1,036.728 ↑ 1.0 4 18,513 / 2

Index Scan using idx_smartq_jobs_log_job_id on smartq_jobs_log (cost=0.43..7.30 rows=4 width=16) (actual time=0.043..0.112 rows=4 loops=18,513)

  • Index Cond: (job_id = smartq_jobs.id)