Enumerated CT

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
9219.508 100.00%
 Merge Join (cost=233572.8..283777.57 rows=2 width=311) (actual time=1504.899..9219.508 rows=4607 loops=1)
  Merge Cond: (r.submission_id = r.submission_id)
3087.236 33.49%
  -> GroupAggregate (cost=67088.02..116132.6 rows=91173 width=22) (actual time=447.853..3087.236 rows=4607 loops=1)
551.566 5.98%
        -> Sort (cost=67088.02..68174.54 rows=434609 width=22) (actual time=447.151..551.566 rows=105961 loops=1)
              Sort Key: r.submission_id
              Sort Method:  external merge  Disk: 3816kB
283.351 3.07%
              -> Hash Join (cost=16.87..17473.78 rows=434609 width=22) (actual time=0.445..283.351 rows=105961 loops=1)
                    Hash Cond: (r.question_id = cvq.id)
97.132 1.05%
                    -> Seq Scan on canvas_integerresponse r (cost=0.0..10544.23 rows=684423 width=12) (actual time=0.019..97.132 rows=682221 loops=1)
0.411 0.00%
                    -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.411..0.411 rows=158 loops=1)
0.345 0.00%
                          -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.153..0.345 rows=158 loops=1)
                                Hash Cond: (cvq.question_id = q.id)
0.070 0.00%
                                -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.017..0.070 rows=158 loops=1)
                                      Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.124 0.00%
                                -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.124..0.124 rows=135 loops=1)
0.064 0.00%
                                      -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.010..0.064 rows=135 loops=1)
6113.035 66.31%
  -> Materialize (cost=166484.78..166484.8 rows=2 width=243) (actual time=1057.034..6113.035 rows=4607 loops=1)
6092.616 66.08%
        -> Merge Join (cost=120095.84..166484.78 rows=2 width=243) (actual time=1057.025..6092.616 rows=4607 loops=1)
              Merge Cond: (r.submission_id = r.submission_id)
4279.853 46.42%
              -> GroupAggregate (cost=46997.08..92396.49 rows=77081 width=22) (actual time=422.175..4279.853 rows=4607 loops=1)
548.398 5.95%
                    -> Sort (cost=46997.08..47765.27 rows=307279 width=22) (actual time=421.203..548.398 rows=128996 loops=1)
                          Sort Key: r.submission_id
                          Sort Method:  external merge  Disk: 5096kB
216.782 2.35%
                          -> Hash Join (cost=16.87..12686.34 rows=307279 width=22) (actual time=0.446..216.782 rows=128996 loops=1)
                                Hash Cond: (r.question_id = cvq.id)
67.717 0.73%
                                -> Seq Scan on canvas_foreignkeyresponse r (cost=0.0..7782.04 rows=483904 width=12) (actual time=0.019..67.717 rows=471388 loops=1)
0.407 0.00%
                                -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.407..0.407 rows=158 loops=1)
0.340 0.00%
                                      -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.148..0.340 rows=158 loops=1)
                                            Hash Cond: (cvq.question_id = q.id)
0.097 0.00%
                                            -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.019..0.097 rows=158 loops=1)
                                                  Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.115 0.00%
                                            -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.115..0.115 rows=135 loops=1)
0.064 0.00%
                                                  -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.011..0.064 rows=135 loops=1)
1798.022 19.50%
              -> Materialize (cost=73098.77..73098.8 rows=3 width=127) (actual time=634.841..1798.022 rows=4607 loops=1)
1784.791 19.36%
                    -> Merge Join (cost=57955.21..73098.76 rows=3 width=127) (actual time=634.833..1784.791 rows=4607 loops=1)
                          Merge Cond: (r.submission_id = r.submission_id)
1181.512 12.82%
                          -> GroupAggregate (cost=13973.97..28216.01 rows=69016 width=19) (actual time=179.297..1181.512 rows=4607 loops=1)
228.532 2.48%
                                -> Sort (cost=13973.97..14217.07 rows=97241 width=19) (actual time=178.969..228.532 rows=64498 loops=1)
                                      Sort Key: r.submission_id
                                      Sort Method:  external merge  Disk: 2160kB
80.762 0.88%
                                      -> Hash Join (cost=16.87..3922.9 rows=97241 width=19) (actual time=0.420..80.762 rows=64498 loops=1)
                                            Hash Cond: (r.question_id = cvq.id)
21.295 0.23%
                                            -> Seq Scan on canvas_booleanresponse r (cost=0.0..2359.36 rows=153136 width=9) (actual time=0.019..21.295 rows=150096 loops=1)
0.379 0.00%
                                            -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.379..0.379 rows=158 loops=1)
0.311 0.00%
                                                  -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.149..0.311 rows=158 loops=1)
                                                        Hash Cond: (cvq.question_id = q.id)
0.090 0.00%
                                                        -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.019..0.090 rows=158 loops=1)
                                                              Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.118 0.00%
                                                        -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.118..0.118 rows=135 loops=1)
0.059 0.00%
                                                              -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.010..0.059 rows=135 loops=1)
592.465 6.43%
                          -> Materialize (cost=43981.24..43981.29 rows=5 width=109) (actual time=455.527..592.465 rows=4607 loops=1)
583.785 6.33%
                                -> Merge Join (cost=36866.8..43981.24 rows=5 width=109) (actual time=455.521..583.785 rows=4607 loops=1)
                                      Merge Cond: (r.submission_id = cs.id)
142.909 1.55%
                                      -> GroupAggregate (cost=19056.29..24865.75 rows=104389 width=22) (actual time=83.357..142.909 rows=4607 loops=1)
87.243 0.95%
                                            -> Sort (cost=19056.29..19383.07 rows=130712 width=22) (actual time=83.296..87.243 rows=13821 loops=1)
                                                  Sort Key: r.submission_id
                                                  Sort Method:  quicksort  Memory: 1320kB
72.655 0.79%
                                                  -> Hash Join (cost=16.87..5267.36 rows=130712 width=22) (actual time=0.408..72.655 rows=13821 loops=1)
                                                        Hash Cond: (r.question_id = cvq.id)
27.246 0.30%
                                                        -> Seq Scan on canvas_dateresponse r (cost=0.0..3171.45 rows=205845 width=12) (actual time=0.018..27.246 rows=199844 loops=1)
0.371 0.00%
                                                        -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.371..0.371 rows=158 loops=1)
0.307 0.00%
                                                              -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.150..0.307 rows=158 loops=1)
                                                                    Hash Cond: (cvq.question_id = q.id)
0.080 0.00%
                                                                    -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.019..0.080 rows=158 loops=1)
                                                                          Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.118 0.00%
                                                                    -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.118..0.118 rows=135 loops=1)
0.065 0.00%
                                                                          -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.011..0.065 rows=135 loops=1)
431.372 4.68%
                                      -> Materialize (cost=17810.52..17810.57 rows=5 width=93) (actual time=372.156..431.372 rows=4607 loops=1)
422.181 4.58%
                                            -> Merge Join (cost=14053.0..17810.51 rows=5 width=93) (actual time=372.150..422.181 rows=4607 loops=1)
                                                  Merge Cond: (r.submission_id = cs.id)
86.832 0.94%
                                                  -> GroupAggregate (cost=10833.39..13696.19 rows=71570 width=34) (actual time=48.103..86.832 rows=4607 loops=1)
51.247 0.56%
                                                        -> Sort (cost=10833.39..11012.32 rows=71570 width=34) (actual time=48.059..51.247 rows=9214 loops=1)
                                                              Sort Key: r.submission_id
                                                              Sort Method:  quicksort  Memory: 1104kB
40.881 0.44%
                                                              -> Hash Join (cost=16.87..3102.32 rows=71570 width=34) (actual time=0.425..40.881 rows=9214 loops=1)
                                                                    Hash Cond: (r.question_id = cvq.id)
15.758 0.17%
                                                                    -> Seq Scan on canvas_textresponse r (cost=0.0..1947.09 rows=112709 width=24) (actual time=0.013..15.758 rows=109639 loops=1)
0.395 0.00%
                                                                    -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.395..0.395 rows=158 loops=1)
0.334 0.00%
                                                                          -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.140..0.334 rows=158 loops=1)
                                                                                Hash Cond: (cvq.question_id = q.id)
0.089 0.00%
                                                                                -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.016..0.089 rows=158 loops=1)
                                                                                      Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.113 0.00%
                                                                                -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.113..0.113 rows=135 loops=1)
0.059 0.00%
                                                                                      -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.009..0.059 rows=135 loops=1)
326.108 3.54%
                                                  -> Sort (cost=3219.61..3219.63 rows=8 width=25) (actual time=324.036..326.108 rows=4607 loops=1)
                                                        Sort Key: cs.id
                                                        Sort Method:  quicksort  Memory: 552kB
319.929 3.47%
                                                        -> Hash Join (cost=2787.31..3219.49 rows=8 width=25) (actual time=312.858..319.929 rows=4607 loops=1)
                                                              Hash Cond: (r.submission_id = cs.id)
275.746 2.99%
                                                              -> HashAggregate (cost=1250.04..1618.76 rows=4609 width=19) (actual time=272.225..275.746 rows=4607 loops=1)
31.803 0.34%
                                                                    -> Hash Join (cost=16.87..840.32 rows=20486 width=19) (actual time=0.403..31.803 rows=32249 loops=1)
                                                                          Hash Cond: (r.question_id = cvq.id)
5.274 0.06%
                                                                          -> Seq Scan on canvas_nullresponse r (cost=0.0..497.61 rows=32261 width=9) (actual time=0.012..5.274 rows=32249 loops=1)
0.375 0.00%
                                                                          -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.375..0.375 rows=158 loops=1)
0.318 0.00%
                                                                                -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.132..0.318 rows=158 loops=1)
                                                                                      Hash Cond: (cvq.question_id = q.id)
0.099 0.00%
                                                                                      -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.013..0.099 rows=158 loops=1)
                                                                                            Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.109 0.00%
                                                                                      -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.109..0.109 rows=135 loops=1)
0.058 0.00%
                                                                                            -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.009..0.058 rows=135 loops=1)
40.597 0.44%
                                                              -> Hash (cost=1534.82..1534.82 rows=196 width=14) (actual time=40.597..40.597 rows=4607 loops=1)
39.200 0.43%
                                                                    -> Hash Join (cost=1310.12..1534.82 rows=196 width=14) (actual time=33.667..39.200 rows=4607 loops=1)
                                                                          Hash Cond: (r.submission_id = cs.id)
32.719 0.35%
                                                                          -> HashAggregate (cost=294.04..431.11 rows=4569 width=19) (actual time=30.563..32.719 rows=4607 loops=1)
8.412 0.09%
                                                                                -> Hash Join (cost=16.87..250.53 rows=5802 width=19) (actual time=0.397..8.412 rows=9214 loops=1)
                                                                                      Hash Cond: (r.question_id = cvq.id)
1.527 0.02%
                                                                                      -> Seq Scan on canvas_nullbooleanresponse r (cost=0.0..141.37 rows=9137 width=9) (actual time=0.008..1.527 rows=9214 loops=1)
0.377 0.00%
                                                                                      -> Hash (cost=15.28..15.28 rows=127 width=18) (actual time=0.377..0.377 rows=158 loops=1)
0.305 0.00%
                                                                                            -> Hash Join (cost=8.04..15.28 rows=127 width=18) (actual time=0.133..0.305 rows=158 loops=1)
                                                                                                  Hash Cond: (cvq.question_id = q.id)
0.083 0.00%
                                                                                                  -> Seq Scan on canvas_chartversionquestion cvq (cost=0.0..5.5 rows=127 width=12) (actual time=0.015..0.083 rows=158 loops=1)
                                                                                                        Filter: (chart_id = ANY ('{3,18}'::integer[]))
0.108 0.00%
                                                                                                  -> Hash (cost=6.35..6.35 rows=135 width=14) (actual time=0.108..0.108 rows=135 loops=1)
0.061 0.00%
                                                                                                        -> Seq Scan on canvas_question q (cost=0.0..6.35 rows=135 width=14) (actual time=0.010..0.061 rows=135 loops=1)
3.075 0.03%
                                                                          -> Hash (cost=957.47..957.47 rows=4689 width=8) (actual time=3.075..3.075 rows=4607 loops=1)
1.915 0.02%
                                                                                -> Bitmap Heap Scan on canvas_submission cs (cost=92.86..957.47 rows=4689 width=8) (actual time=0.664..1.915 rows=4607 loops=1)
                                                                                      Recheck Cond: (chart_id = ANY ('{3,18}'::integer[]))
0.636 0.01%
                                                                                      -> Bitmap Index Scan on canvas_submission_questionnaire_id (cost=0.0..91.69 rows=4689 width=0) (actual time=0.636..0.636 rows=4718 loops=1)
                                                                                            Index Cond: (chart_id = ANY ('{3,18}'::integer[]))
Run-time
9.226776 seconds (9226.776 ms)