explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IQHt

Settings
# exclusive inclusive rows x rows loops node
1. 1,756.441 12,015.721 ↑ 1.0 2 1

GroupAggregate (cost=44,995.19..44,998.55 rows=2 width=33) (actual time=10,742.243..12,015.721 rows=2 loops=1)

  • Group Key: survey_surveytaker.complete
2. 1,472.408 10,259.280 ↓ 15,893.6 3,544,281 1

Sort (cost=44,995.19..44,995.75 rows=223 width=13) (actual time=9,909.079..10,259.280 rows=3,544,281 loops=1)

  • Sort Key: survey_surveytaker.complete
  • Sort Method: external merge Disk: 90,184kB
3. 180.908 8,786.872 ↓ 15,893.6 3,544,281 1

Gather (cost=4,283.20..44,986.49 rows=223 width=13) (actual time=24.456..8,786.872 rows=3,544,281 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 1,682.382 8,605.964 ↓ 12,703.5 1,181,427 3 / 3

Nested Loop (cost=3,283.20..43,964.19 rows=93 width=13) (actual time=22.843..8,605.964 rows=1,181,427 loops=3)

5. 731.667 1,016.447 ↓ 1,191.0 1,181,427 3 / 3

Hash Join (cost=3,282.77..43,100.18 rows=992 width=12) (actual time=22.818..1,016.447 rows=1,181,427 loops=3)

  • Hash Cond: (survey_sentemployeegroup_takers.sentemployeegroup_id = survey_sentemployeegroup.id)
6. 262.038 262.038 ↑ 1.3 1,181,427 3 / 3

Parallel Seq Scan on temp_survey_sentemployeegroup_takers survey_sentemployeegroup_takers (cost=0.00..35,940.84 rows=1,476,784 width=8) (actual time=0.009..262.038 rows=1,181,427 loops=3)

7. 11.179 22.742 ↓ 12.8 22,623 3 / 3

Hash (cost=3,260.75..3,260.75 rows=1,762 width=12) (actual time=22.742..22.742 rows=22,623 loops=3)

  • Buckets: 32,768 (originally 2048) Batches: 1 (originally 1) Memory Usage: 1,229kB
8. 11.563 11.563 ↓ 12.8 22,623 3 / 3

Index Only Scan using survey_sentemployeegroup_idx1 on survey_sentemployeegroup (cost=0.43..3,260.75 rows=1,762 width=12) (actual time=0.037..11.563 rows=22,623 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[])) AND (instance_id = ANY ('{10288,10131,9995,9938,9828}'::integer[])) AND (original_id IS NOT NULL))
  • Heap Fetches: 11,019
9. 5,907.135 5,907.135 ↑ 1.0 1 3,544,281 / 3

Index Scan using survey_surveytaker_pkey on survey_surveytaker (cost=0.43..0.87 rows=1 width=5) (actual time=0.005..0.005 rows=1 loops=3,544,281)

  • Index Cond: (id = survey_sentemployeegroup_takers.surveytaker_id)
  • Filter: (((NOT complete) OR (NOT skip_when_counting) OR (skip_when_counting IS NULL)) AND (instance_id = ANY ('{10288,10131,9995,9938,9828}'::integer[])))
Planning time : 0.713 ms
Execution time : 12,033.589 ms