explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2DAt

Settings
# exclusive inclusive rows x rows loops node
1. 1,755.678 4,897.209 ↑ 1.0 2 1

GroupAggregate (cost=520,049.05..523,226.02 rows=2 width=33) (actual time=3,604.746..4,897.209 rows=2 loops=1)

  • Group Key: survey_surveytaker.complete
2. 1,087.756 3,141.531 ↓ 16.7 3,544,281 1

Sort (cost=520,049.05..520,578.54 rows=211,797 width=13) (actual time=2,835.410..3,141.531 rows=3,544,281 loops=1)

  • Sort Key: survey_surveytaker.complete
  • Sort Method: external merge Disk: 90,176kB
3. 991.687 2,053.775 ↓ 16.7 3,544,281 1

Hash Join (cost=320,103.49..501,313.14 rows=211,797 width=13) (actual time=239.462..2,053.775 rows=3,544,281 loops=1)

  • Hash Cond: (survey_sentemployeegroup_takers.surveytaker_id = survey_surveytaker.id)
4. 824.258 824.258 ↓ 1.6 3,544,281 1

Index Scan using temp_survey_sentemployeegroup_takers_idx3 on temp_survey_sentemployeegroup_takers survey_sentemployeegroup_takers (cost=0.43..175,278.45 rows=2,259,663 width=12) (actual time=0.058..824.258 rows=3,544,281 loops=1)

  • 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)
5. 66.939 237.830 ↑ 1.0 329,633 1

Hash (cost=315,778.05..315,778.05 rows=346,001 width=5) (actual time=237.830..237.830 rows=329,633 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 16,973kB
6. 170.891 170.891 ↑ 1.0 329,633 1

Index Scan using survey_surveytaker_instance_id on survey_surveytaker (cost=0.43..315,778.05 rows=346,001 width=5) (actual time=0.040..170.891 rows=329,633 loops=1)

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