explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DSYj

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,139.807 ↓ 4.5 1,112 1

Finalize GroupAggregate (cost=481,834.85..482,040.55 rows=246 width=28) (actual time=2,138.891..2,139.807 rows=1,112 loops=1)

  • Group Key: survey_sentemployeegroup_takers.original_id
  • Filter: (count(survey_sentemployeegroup_takers.surveytaker_id) FILTER (WHERE survey_surveytaker.complete) > 0)
  • Rows Removed by Filter: 16
2. 13.790 2,141.417 ↓ 2.0 2,921 1

Gather Merge (cost=481,834.85..482,007.30 rows=1,478 width=20) (actual time=2,138.884..2,141.417 rows=2,921 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.379 2,127.627 ↓ 1.3 974 3 / 3

Sort (cost=480,834.83..480,836.67 rows=739 width=20) (actual time=2,127.558..2,127.627 rows=974 loops=3)

  • Sort Key: survey_sentemployeegroup_takers.original_id
  • Sort Method: quicksort Memory: 104kB
  • Worker 0: Sort Method: quicksort Memory: 94kB
  • Worker 1: Sort Method: quicksort Memory: 104kB
4. 449.881 2,127.248 ↓ 1.3 974 3 / 3

Partial HashAggregate (cost=480,792.23..480,799.62 rows=739 width=20) (actual time=2,127.032..2,127.248 rows=974 loops=3)

  • Group Key: survey_sentemployeegroup_takers.original_id
5. 723.276 1,677.367 ↓ 13.4 1,181,427 3 / 3

Parallel Hash Join (cost=315,562.18..480,130.34 rows=88,251 width=9) (actual time=174.843..1,677.367 rows=1,181,427 loops=3)

  • Hash Cond: (survey_sentemployeegroup_takers.surveytaker_id = survey_surveytaker.id)
6. 782.025 782.025 ↓ 1.3 1,181,427 3 / 3

Parallel Index Scan using temp_survey_sentemployeegroup_takers_idx3 on temp_survey_sentemployeegroup_takers survey_sentemployeegroup_takers (cost=0.43..162,097.09 rows=941,526 width=8) (actual time=1.253..782.025 rows=1,181,427 loops=3)

  • Index Cond: (category_id = ANY ('{33638,30419,30420,30416,30422,30415,30418,30421,30440,30439,30438,30427,30414,30449,30436,30434,30432,30431,30430,30429,30428,30424,30423,30433,30435,30426,30442,30437,30425,30417,33637,32343,32347,32344,32345,32349,32346,32348,32342,32340,32350,32341,34750,34749,33636,33130,33128,33141,33140,33139,33138,33137,33136,33135,33134,33133,33132,33131,33129,33127,37441,37440,37375,37369,36513,36447,36446,36449,36448,36445,36444,36443,36442,36441,36440,38156,38054,38053,38052,38051,38050,38049,38048,38047,38046,38045,38044}'::integer[]))
  • Filter: (original_id IS NOT NULL)
7. 58.375 172.066 ↑ 1.3 109,878 3 / 3

Parallel Hash (cost=313,759.63..313,759.63 rows=144,170 width=5) (actual time=172.065..172.066 rows=109,878 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 17,056kB
8. 113.691 113.691 ↑ 1.3 109,878 3 / 3

Parallel Index Scan using survey_surveytaker_instance_id on survey_surveytaker (cost=0.43..313,759.63 rows=144,170 width=5) (actual time=0.061..113.691 rows=109,878 loops=3)

  • Index Cond: (instance_id = ANY ('{10288,10131,9995,9938,9828}'::integer[]))
  • Filter: (complete OR (NOT skip_when_counting) OR (skip_when_counting IS NULL))
Planning time : 0.380 ms
Execution time : 2,141.993 ms