explain.depesz.com

PostgreSQL's explain analyze made readable

Result: psKb

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

Limit (cost=59,884.22..59,902.88 rows=1 width=568) (actual time=8,613.111..8,613.118 rows=1 loops=1)

2.          

Initplan (forLimit)

3. 0.021 371.492 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=40) (actual time=371.485..371.492 rows=1 loops=1)

4. 1.612 371.471 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=40) (actual time=371.471..371.471 rows=1 loops=1)

  • Sort Key: metric_summaries.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
5. 6.200 369.859 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=40) (actual time=351.595..369.859 rows=214 loops=1)

  • Join Filter: (metric_summaries.survey_id = units_1.public_id)
6. 4.825 357.881 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=350.016..357.881 rows=214 loops=1)

  • Merge Cond: (metric_summaries.survey_id = units_2.public_id)
7. 3.500 223.116 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=221.592..223.116 rows=214 loops=1)

  • Sort Key: metric_summaries.survey_id
  • Sort Method: quicksort Memory: 41kB
8. 2.994 219.616 ↓ 1.1 214 1

Subquery Scan on metric_summaries (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=215.069..219.616 rows=214 loops=1)

9. 3.404 216.622 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=215.055..216.622 rows=214 loops=1)

  • Group Key: r_survey_summaries.survey_id
10. 40.963 213.218 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=135.514..213.218 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries.survey_id = units_3.public_id)
11. 39.044 39.044 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.636..39.044 rows=5,302 loops=1)

12. 1.785 133.211 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=133.211..133.211 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
13. 3.324 131.426 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=129.840..131.426 rows=218 loops=1)

  • Group Key: units_3.public_id
14. 3.056 128.102 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=3.880..128.102 rows=218 loops=1)

15. 1.524 1.524 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_2 (cost=0.15..8.17 rows=1 width=4) (actual time=1.515..1.524 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
16. 59.749 123.522 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.343..123.522 rows=218 loops=1)

  • Hash Cond: (units_3.campaign_id = campaigns_2.campaign_id)
17. 62.876 62.876 ↑ 1.0 7,900 1

Seq Scan on units units_3 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=1.138..62.876 rows=7,900 loops=1)

18. 0.117 0.897 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.897..0.897 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 0.780 0.780 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_2 (cost=0.00..16.80 rows=12 width=8) (actual time=0.606..0.780 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
20. 3.730 129.940 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=128.398..129.940 rows=218 loops=1)

  • Sort Key: units_2.public_id
  • Sort Method: quicksort Memory: 42kB
21. 3.307 126.210 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.130..126.210 rows=218 loops=1)

22. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_1 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
23. 59.860 122.877 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.088..122.877 rows=218 loops=1)

  • Hash Cond: (units_2.campaign_id = campaigns_1.campaign_id)
24. 62.214 62.214 ↑ 1.0 7,900 1

Seq Scan on units units_2 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.952..62.214 rows=7,900 loops=1)

25. 0.111 0.803 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.803..0.803 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.692 0.692 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_1 (cost=0.00..16.80 rows=12 width=8) (actual time=0.519..0.692 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
27. 5.778 5.778 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_1 (cost=0.28..0.82 rows=1 width=25) (actual time=0.020..0.027 rows=1 loops=214)

  • Index Cond: (public_id = units_2.public_id)
  • Heap Fetches: 214
28. 0.022 367.727 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=43) (actual time=367.720..367.727 rows=1 loops=1)

29. 1.607 367.705 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=43) (actual time=367.705..367.705 rows=1 loops=1)

  • Sort Key: metric_summaries_1.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
30. 6.266 366.098 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=43) (actual time=347.256..366.098 rows=214 loops=1)

  • Join Filter: (metric_summaries_1.survey_id = units_4.public_id)
31. 4.863 355.124 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=347.200..355.124 rows=214 loops=1)

  • Merge Cond: (metric_summaries_1.survey_id = units_5.public_id)
32. 3.530 222.649 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=221.124..222.649 rows=214 loops=1)

  • Sort Key: metric_summaries_1.survey_id
  • Sort Method: quicksort Memory: 41kB
33. 2.978 219.119 ↓ 1.1 214 1

Subquery Scan on metric_summaries_1 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=214.572..219.119 rows=214 loops=1)

34. 3.370 216.141 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=214.558..216.141 rows=214 loops=1)

  • Group Key: r_survey_summaries_1.survey_id
35. 41.856 212.771 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=133.683..212.771 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_1.survey_id = units_6.public_id)
36. 39.566 39.566 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_1 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.652..39.566 rows=5,302 loops=1)

37. 1.778 131.349 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=131.349..131.349 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
38. 3.625 129.571 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=127.843..129.571 rows=218 loops=1)

  • Group Key: units_6.public_id
39. 3.122 125.946 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.250..125.946 rows=218 loops=1)

40. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_4 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
41. 59.642 122.796 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.208..122.796 rows=218 loops=1)

  • Hash Cond: (units_6.campaign_id = campaigns_4.campaign_id)
42. 61.918 61.918 ↑ 1.0 7,900 1

Seq Scan on units units_6 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.665..61.918 rows=7,900 loops=1)

43. 0.112 1.236 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=1.236..1.236 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
44. 1.124 1.124 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_4 (cost=0.00..16.80 rows=12 width=8) (actual time=0.956..1.124 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
45. 3.561 127.612 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=126.050..127.612 rows=218 loops=1)

  • Sort Key: units_5.public_id
  • Sort Method: quicksort Memory: 42kB
46. 3.168 124.051 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.869..124.051 rows=218 loops=1)

47. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_3 (cost=0.15..8.17 rows=1 width=4) (actual time=0.019..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
48. 58.989 120.855 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.828..120.855 rows=218 loops=1)

  • Hash Cond: (units_5.campaign_id = campaigns_3.campaign_id)
49. 61.073 61.073 ↑ 1.0 7,900 1

Seq Scan on units units_5 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.724..61.073 rows=7,900 loops=1)

50. 0.111 0.793 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.793..0.793 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
51. 0.682 0.682 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_3 (cost=0.00..16.80 rows=12 width=8) (actual time=0.514..0.682 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
52. 4.708 4.708 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_4 (cost=0.28..0.82 rows=1 width=60) (actual time=0.014..0.022 rows=1 loops=214)

  • Index Cond: (public_id = units_5.public_id)
53. 0.021 370.489 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=8) (actual time=370.482..370.489 rows=1 loops=1)

54. 1.563 370.468 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=8) (actual time=370.468..370.468 rows=1 loops=1)

  • Sort Key: metric_summaries_2.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
55. 6.150 368.905 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=8) (actual time=350.487..368.905 rows=214 loops=1)

  • Join Filter: (metric_summaries_2.survey_id = units_7.public_id)
56. 4.845 358.261 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=350.424..358.261 rows=214 loops=1)

  • Merge Cond: (metric_summaries_2.survey_id = units_8.public_id)
57. 4.825 224.457 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=222.954..224.457 rows=214 loops=1)

  • Sort Key: metric_summaries_2.survey_id
  • Sort Method: quicksort Memory: 41kB
58. 3.486 219.632 ↓ 1.1 214 1

Subquery Scan on metric_summaries_2 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=214.234..219.632 rows=214 loops=1)

59. 3.801 216.146 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=214.215..216.146 rows=214 loops=1)

  • Group Key: r_survey_summaries_2.survey_id
60. 42.221 212.345 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=131.085..212.345 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_2.survey_id = units_9.public_id)
61. 41.438 41.438 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_2 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.803..41.438 rows=5,302 loops=1)

62. 1.713 128.686 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=128.686..128.686 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
63. 3.454 126.973 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=125.411..126.973 rows=218 loops=1)

  • Group Key: units_9.public_id
64. 3.167 123.519 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.926..123.519 rows=218 loops=1)

65. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_6 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
66. 59.203 120.327 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.885..120.327 rows=218 loops=1)

  • Hash Cond: (units_9.campaign_id = campaigns_6.campaign_id)
67. 60.253 60.253 ↑ 1.0 7,900 1

Seq Scan on units units_9 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.659..60.253 rows=7,900 loops=1)

68. 0.105 0.871 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.871..0.871 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
69. 0.766 0.766 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_6 (cost=0.00..16.80 rows=12 width=8) (actual time=0.600..0.766 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
70. 3.615 128.959 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=127.443..128.959 rows=218 loops=1)

  • Sort Key: units_8.public_id
  • Sort Method: quicksort Memory: 42kB
71. 3.140 125.344 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.681..125.344 rows=218 loops=1)

72. 0.036 0.036 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_5 (cost=0.15..8.17 rows=1 width=4) (actual time=0.027..0.036 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
73. 59.603 122.168 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.627..122.168 rows=218 loops=1)

  • Hash Cond: (units_8.campaign_id = campaigns_5.campaign_id)
74. 61.319 61.319 ↑ 1.0 7,900 1

Seq Scan on units units_8 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=1.013..61.319 rows=7,900 loops=1)

75. 0.132 1.246 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=1.246..1.246 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
76. 1.114 1.114 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_5 (cost=0.00..16.80 rows=12 width=8) (actual time=0.880..1.114 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
77. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_7 (cost=0.28..0.82 rows=1 width=25) (actual time=0.014..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_8.public_id)
  • Heap Fetches: 214
78. 0.023 358.305 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=40) (actual time=358.297..358.305 rows=1 loops=1)

79. 1.651 358.282 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=40) (actual time=358.282..358.282 rows=1 loops=1)

  • Sort Key: metric_summaries_3.num_page_views
  • Sort Method: top-N heapsort Memory: 25kB
80. 6.420 356.631 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=40) (actual time=337.246..356.631 rows=214 loops=1)

  • Join Filter: (metric_summaries_3.survey_id = units_10.public_id)
81. 5.162 345.503 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=337.188..345.503 rows=214 loops=1)

  • Merge Cond: (metric_summaries_3.survey_id = units_11.public_id)
82. 3.501 215.021 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=213.444..215.021 rows=214 loops=1)

  • Sort Key: metric_summaries_3.survey_id
  • Sort Method: quicksort Memory: 41kB
83. 2.866 211.520 ↓ 1.1 214 1

Subquery Scan on metric_summaries_3 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=207.162..211.520 rows=214 loops=1)

84. 3.309 208.654 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=207.148..208.654 rows=214 loops=1)

  • Group Key: r_survey_summaries_3.survey_id
85. 40.670 205.345 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=128.570..205.345 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_3.survey_id = units_12.public_id)
86. 38.463 38.463 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_3 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.694..38.463 rows=5,302 loops=1)

87. 1.658 126.212 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=126.212..126.212 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
88. 3.196 124.554 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=123.044..124.554 rows=218 loops=1)

  • Group Key: units_12.public_id
89. 2.934 121.358 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.710..121.358 rows=218 loops=1)

90. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_8 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
91. 58.116 118.402 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.676..118.402 rows=218 loops=1)

  • Hash Cond: (units_12.campaign_id = campaigns_8.campaign_id)
92. 59.417 59.417 ↑ 1.0 7,900 1

Seq Scan on units units_12 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.507..59.417 rows=7,900 loops=1)

93. 0.124 0.869 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.869..0.869 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
94. 0.745 0.745 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_8 (cost=0.00..16.80 rows=12 width=8) (actual time=0.573..0.745 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
95. 3.652 125.320 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=123.719..125.320 rows=218 loops=1)

  • Sort Key: units_11.public_id
  • Sort Method: quicksort Memory: 42kB
96. 3.046 121.668 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.007..121.668 rows=218 loops=1)

97. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_7 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
98. 58.390 118.597 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.968..118.597 rows=218 loops=1)

  • Hash Cond: (units_11.campaign_id = campaigns_7.campaign_id)
99. 59.339 59.339 ↑ 1.0 7,900 1

Seq Scan on units units_11 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.733..59.339 rows=7,900 loops=1)

100. 0.153 0.868 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.868..0.868 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
101. 0.715 0.715 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_7 (cost=0.00..16.80 rows=12 width=8) (actual time=0.509..0.715 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
102. 4.708 4.708 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_10 (cost=0.28..0.82 rows=1 width=25) (actual time=0.015..0.022 rows=1 loops=214)

  • Index Cond: (public_id = units_11.public_id)
  • Heap Fetches: 214
103. 0.021 356.415 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=43) (actual time=356.409..356.415 rows=1 loops=1)

104. 1.572 356.394 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=43) (actual time=356.394..356.394 rows=1 loops=1)

  • Sort Key: metric_summaries_4.num_page_views
  • Sort Method: top-N heapsort Memory: 25kB
105. 6.043 354.822 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=43) (actual time=336.875..354.822 rows=214 loops=1)

  • Join Filter: (metric_summaries_4.survey_id = units_13.public_id)
106. 4.669 344.499 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=336.818..344.499 rows=214 loops=1)

  • Merge Cond: (metric_summaries_4.survey_id = units_14.public_id)
107. 3.467 216.564 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=215.015..216.564 rows=214 loops=1)

  • Sort Key: metric_summaries_4.survey_id
  • Sort Method: quicksort Memory: 41kB
108. 2.901 213.097 ↓ 1.1 214 1

Subquery Scan on metric_summaries_4 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=208.697..213.097 rows=214 loops=1)

109. 3.313 210.196 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=208.682..210.196 rows=214 loops=1)

  • Group Key: r_survey_summaries_4.survey_id
110. 41.187 206.883 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=129.198..206.883 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_4.survey_id = units_15.public_id)
111. 38.823 38.823 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_4 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.730..38.823 rows=5,302 loops=1)

112. 1.662 126.873 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=126.873..126.873 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
113. 3.245 125.211 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=123.703..125.211 rows=218 loops=1)

  • Group Key: units_15.public_id
114. 3.055 121.966 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.783..121.966 rows=218 loops=1)

115. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_10 (cost=0.15..8.17 rows=1 width=4) (actual time=0.015..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
116. 58.752 118.886 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.744..118.886 rows=218 loops=1)

  • Hash Cond: (units_15.campaign_id = campaigns_10.campaign_id)
117. 59.258 59.258 ↑ 1.0 7,900 1

Seq Scan on units units_15 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.508..59.258 rows=7,900 loops=1)

118. 0.119 0.876 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.876..0.876 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
119. 0.757 0.757 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_10 (cost=0.00..16.80 rows=12 width=8) (actual time=0.516..0.757 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
120. 3.616 123.266 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=121.776..123.266 rows=218 loops=1)

  • Sort Key: units_14.public_id
  • Sort Method: quicksort Memory: 42kB
121. 3.202 119.650 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.878..119.650 rows=218 loops=1)

122. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_9 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
123. 57.182 116.422 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.839..116.422 rows=218 loops=1)

  • Hash Cond: (units_14.campaign_id = campaigns_9.campaign_id)
124. 58.435 58.435 ↑ 1.0 7,900 1

Seq Scan on units units_14 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.732..58.435 rows=7,900 loops=1)

125. 0.114 0.805 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.805..0.805 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
126. 0.691 0.691 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_9 (cost=0.00..16.80 rows=12 width=8) (actual time=0.525..0.691 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
127. 4.280 4.280 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_13 (cost=0.28..0.82 rows=1 width=60) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_14.public_id)
128. 0.022 362.766 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=8) (actual time=362.759..362.766 rows=1 loops=1)

129. 1.586 362.744 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=8) (actual time=362.744..362.744 rows=1 loops=1)

  • Sort Key: metric_summaries_5.num_page_views
  • Sort Method: top-N heapsort Memory: 25kB
130. 6.018 361.158 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=8) (actual time=342.935..361.158 rows=214 loops=1)

  • Join Filter: (metric_summaries_5.survey_id = units_16.public_id)
131. 4.929 350.860 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=342.870..350.860 rows=214 loops=1)

  • Merge Cond: (metric_summaries_5.survey_id = units_17.public_id)
132. 3.400 220.781 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=219.280..220.781 rows=214 loops=1)

  • Sort Key: metric_summaries_5.survey_id
  • Sort Method: quicksort Memory: 41kB
133. 2.855 217.381 ↓ 1.1 214 1

Subquery Scan on metric_summaries_5 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=213.047..217.381 rows=214 loops=1)

134. 3.235 214.526 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=213.032..214.526 rows=214 loops=1)

  • Group Key: r_survey_summaries_5.survey_id
135. 42.783 211.291 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=132.991..211.291 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_5.survey_id = units_18.public_id)
136. 38.908 38.908 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_5 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.592..38.908 rows=5,302 loops=1)

137. 1.981 129.600 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=129.600..129.600 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
138. 3.560 127.619 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=125.868..127.619 rows=218 loops=1)

  • Group Key: units_18.public_id
139. 3.113 124.059 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.546..124.059 rows=218 loops=1)

140. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_12 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
141. 58.735 120.919 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.507..120.919 rows=218 loops=1)

  • Hash Cond: (units_18.campaign_id = campaigns_12.campaign_id)
142. 61.458 61.458 ↑ 1.0 7,900 1

Seq Scan on units units_18 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.473..61.458 rows=7,900 loops=1)

143. 0.118 0.726 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.726..0.726 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
144. 0.608 0.608 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_12 (cost=0.00..16.80 rows=12 width=8) (actual time=0.437..0.608 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
145. 3.657 125.150 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=123.564..125.150 rows=218 loops=1)

  • Sort Key: units_17.public_id
  • Sort Method: quicksort Memory: 42kB
146. 2.977 121.493 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.166..121.493 rows=218 loops=1)

147. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_11 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
148. 58.040 118.491 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.125..118.491 rows=218 loops=1)

  • Hash Cond: (units_17.campaign_id = campaigns_11.campaign_id)
149. 59.335 59.335 ↑ 1.0 7,900 1

Seq Scan on units units_17 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.666..59.335 rows=7,900 loops=1)

150. 0.126 1.116 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=1.116..1.116 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
151. 0.990 0.990 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_11 (cost=0.00..16.80 rows=12 width=8) (actual time=0.500..0.990 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
152. 4.280 4.280 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_16 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_17.public_id)
  • Heap Fetches: 214
153. 0.021 353.693 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=48) (actual time=353.686..353.693 rows=1 loops=1)

154. 1.709 353.672 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=48) (actual time=353.672..353.672 rows=1 loops=1)

  • Sort Key: metric_summaries_6.positive_response_percentage DESC, metric_summaries_6.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
155. 6.273 351.963 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=48) (actual time=333.097..351.963 rows=214 loops=1)

  • Join Filter: (metric_summaries_6.survey_id = units_19.public_id)
156. 4.952 341.196 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=333.034..341.196 rows=214 loops=1)

  • Merge Cond: (metric_summaries_6.survey_id = units_20.public_id)
157. 3.497 212.551 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=210.947..212.551 rows=214 loops=1)

  • Sort Key: metric_summaries_6.survey_id
  • Sort Method: quicksort Memory: 41kB
158. 2.931 209.054 ↓ 1.1 214 1

Subquery Scan on metric_summaries_6 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=204.504..209.054 rows=214 loops=1)

159. 3.379 206.123 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=204.489..206.123 rows=214 loops=1)

  • Group Key: r_survey_summaries_6.survey_id
160. 39.907 202.744 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=127.033..202.744 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_6.survey_id = units_21.public_id)
161. 38.062 38.062 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_6 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.670..38.062 rows=5,302 loops=1)

162. 1.588 124.775 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=124.775..124.775 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
163. 3.336 123.187 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=121.681..123.187 rows=218 loops=1)

  • Group Key: units_21.public_id
164. 2.977 119.851 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.643..119.851 rows=218 loops=1)

165. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_14 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
166. 57.188 116.852 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.608..116.852 rows=218 loops=1)

  • Hash Cond: (units_21.campaign_id = campaigns_14.campaign_id)
167. 58.907 58.907 ↑ 1.0 7,900 1

Seq Scan on units units_21 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.558..58.907 rows=7,900 loops=1)

168. 0.116 0.757 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.757..0.757 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
169. 0.641 0.641 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_14 (cost=0.00..16.80 rows=12 width=8) (actual time=0.459..0.641 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
170. 3.682 123.693 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=122.062..123.693 rows=218 loops=1)

  • Sort Key: units_20.public_id
  • Sort Method: quicksort Memory: 42kB
171. 3.155 120.011 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.809..120.011 rows=218 loops=1)

172. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_13 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
173. 57.385 116.831 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.769..116.831 rows=218 loops=1)

  • Hash Cond: (units_20.campaign_id = campaigns_13.campaign_id)
174. 58.672 58.672 ↑ 1.0 7,900 1

Seq Scan on units units_20 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.637..58.672 rows=7,900 loops=1)

175. 0.110 0.774 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.774..0.774 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
176. 0.664 0.664 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_13 (cost=0.00..16.80 rows=12 width=8) (actual time=0.457..0.664 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
177. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_19 (cost=0.28..0.82 rows=1 width=25) (actual time=0.014..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_20.public_id)
  • Heap Fetches: 214
178. 0.024 359.216 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=51) (actual time=359.208..359.216 rows=1 loops=1)

179. 1.683 359.192 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=51) (actual time=359.192..359.192 rows=1 loops=1)

  • Sort Key: metric_summaries_7.positive_response_percentage DESC, metric_summaries_7.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
180. 6.032 357.509 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=51) (actual time=339.209..357.509 rows=214 loops=1)

  • Join Filter: (metric_summaries_7.survey_id = units_22.public_id)
181. 4.839 346.983 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=339.149..346.983 rows=214 loops=1)

  • Merge Cond: (metric_summaries_7.survey_id = units_23.public_id)
182. 3.409 216.847 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=215.354..216.847 rows=214 loops=1)

  • Sort Key: metric_summaries_7.survey_id
  • Sort Method: quicksort Memory: 41kB
183. 2.930 213.438 ↓ 1.1 214 1

Subquery Scan on metric_summaries_7 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=208.898..213.438 rows=214 loops=1)

184. 3.428 210.508 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=208.883..210.508 rows=214 loops=1)

  • Group Key: r_survey_summaries_7.survey_id
185. 39.443 207.080 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=131.311..207.080 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_7.survey_id = units_24.public_id)
186. 38.407 38.407 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_7 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.487..38.407 rows=5,302 loops=1)

187. 1.766 129.230 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=129.230..129.230 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
188. 3.872 127.464 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=125.455..127.464 rows=218 loops=1)

  • Group Key: units_24.public_id
189. 3.024 123.592 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.396..123.592 rows=218 loops=1)

190. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_16 (cost=0.15..8.17 rows=1 width=4) (actual time=0.015..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
191. 59.548 120.541 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.346..120.541 rows=218 loops=1)

  • Hash Cond: (units_24.campaign_id = campaigns_16.campaign_id)
192. 60.309 60.309 ↑ 1.0 7,900 1

Seq Scan on units units_24 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.360..60.309 rows=7,900 loops=1)

193. 0.114 0.684 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.684..0.684 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
194. 0.570 0.570 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_16 (cost=0.00..16.80 rows=12 width=8) (actual time=0.404..0.570 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
195. 3.652 125.297 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=123.770..125.297 rows=218 loops=1)

  • Sort Key: units_23.public_id
  • Sort Method: quicksort Memory: 42kB
196. 3.065 121.645 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.636..121.645 rows=218 loops=1)

197. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_15 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
198. 57.919 118.553 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.596..118.553 rows=218 loops=1)

  • Hash Cond: (units_23.campaign_id = campaigns_15.campaign_id)
199. 59.965 59.965 ↑ 1.0 7,900 1

Seq Scan on units units_23 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.624..59.965 rows=7,900 loops=1)

200. 0.112 0.669 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.669..0.669 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
201. 0.557 0.557 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_15 (cost=0.00..16.80 rows=12 width=8) (actual time=0.382..0.557 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
202. 4.494 4.494 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_22 (cost=0.28..0.82 rows=1 width=60) (actual time=0.013..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_23.public_id)
203. 0.023 363.309 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=16) (actual time=363.302..363.309 rows=1 loops=1)

204. 1.663 363.286 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=16) (actual time=363.286..363.286 rows=1 loops=1)

  • Sort Key: metric_summaries_8.positive_response_percentage DESC, metric_summaries_8.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
205. 5.927 361.623 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=16) (actual time=343.409..361.623 rows=214 loops=1)

  • Join Filter: (metric_summaries_8.survey_id = units_25.public_id)
206. 4.881 351.202 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=343.355..351.202 rows=214 loops=1)

  • Merge Cond: (metric_summaries_8.survey_id = units_26.public_id)
207. 3.499 218.063 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=216.572..218.063 rows=214 loops=1)

  • Sort Key: metric_summaries_8.survey_id
  • Sort Method: quicksort Memory: 41kB
208. 2.859 214.564 ↓ 1.1 214 1

Subquery Scan on metric_summaries_8 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=209.980..214.564 rows=214 loops=1)

209. 3.531 211.705 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=209.964..211.705 rows=214 loops=1)

  • Group Key: r_survey_summaries_8.survey_id
210. 39.565 208.174 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=133.296..208.174 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_8.survey_id = units_27.public_id)
211. 37.969 37.969 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_8 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.703..37.969 rows=5,302 loops=1)

212. 1.680 130.640 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=130.640..130.640 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
213. 3.339 128.960 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=127.378..128.960 rows=218 loops=1)

  • Group Key: units_27.public_id
214. 2.978 125.621 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.585..125.621 rows=218 loops=1)

215. 0.024 0.024 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_18 (cost=0.15..8.17 rows=1 width=4) (actual time=0.014..0.024 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
216. 61.211 122.619 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.549..122.619 rows=218 loops=1)

  • Hash Cond: (units_27.campaign_id = campaigns_18.campaign_id)
217. 60.549 60.549 ↑ 1.0 7,900 1

Seq Scan on units units_27 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.379..60.549 rows=7,900 loops=1)

218. 0.107 0.859 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.859..0.859 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
219. 0.752 0.752 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_18 (cost=0.00..16.80 rows=12 width=8) (actual time=0.586..0.752 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
220. 3.595 128.258 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=126.749..128.258 rows=218 loops=1)

  • Sort Key: units_26.public_id
  • Sort Method: quicksort Memory: 42kB
221. 3.079 124.663 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.711..124.663 rows=218 loops=1)

222. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_17 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
223. 59.759 121.557 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.672..121.557 rows=218 loops=1)

  • Hash Cond: (units_26.campaign_id = campaigns_17.campaign_id)
224. 61.088 61.088 ↑ 1.0 7,900 1

Seq Scan on units units_26 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.657..61.088 rows=7,900 loops=1)

225. 0.105 0.710 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.710..0.710 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
226. 0.605 0.605 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_17 (cost=0.00..16.80 rows=12 width=8) (actual time=0.437..0.605 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
227. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_25 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_26.public_id)
  • Heap Fetches: 214
228. 0.022 356.017 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=48) (actual time=356.010..356.017 rows=1 loops=1)

229. 1.615 355.995 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=48) (actual time=355.995..355.995 rows=1 loops=1)

  • Sort Key: metric_summaries_9.negative_response_percentage DESC, metric_summaries_9.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
230. 6.015 354.380 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=48) (actual time=336.232..354.380 rows=214 loops=1)

  • Join Filter: (metric_summaries_9.survey_id = units_28.public_id)
231. 4.713 343.871 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=336.171..343.871 rows=214 loops=1)

  • Merge Cond: (metric_summaries_9.survey_id = units_29.public_id)
232. 3.461 213.242 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=211.740..213.242 rows=214 loops=1)

  • Sort Key: metric_summaries_9.survey_id
  • Sort Method: quicksort Memory: 41kB
233. 2.991 209.781 ↓ 1.1 214 1

Subquery Scan on metric_summaries_9 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=205.139..209.781 rows=214 loops=1)

234. 3.423 206.790 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=205.124..206.790 rows=214 loops=1)

  • Group Key: r_survey_summaries_9.survey_id
235. 39.482 203.367 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=128.110..203.367 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_9.survey_id = units_30.public_id)
236. 37.901 37.901 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_9 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.505..37.901 rows=5,302 loops=1)

237. 1.598 125.984 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.984..125.984 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
238. 3.219 124.386 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=122.877..124.386 rows=218 loops=1)

  • Group Key: units_30.public_id
239. 3.045 121.167 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.447..121.167 rows=218 loops=1)

240. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_20 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
241. 58.562 118.100 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.412..118.100 rows=218 loops=1)

  • Hash Cond: (units_30.campaign_id = campaigns_20.campaign_id)
242. 58.872 58.872 ↑ 1.0 7,900 1

Seq Scan on units units_30 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.451..58.872 rows=7,900 loops=1)

243. 0.112 0.666 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.666..0.666 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
244. 0.554 0.554 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_20 (cost=0.00..16.80 rows=12 width=8) (actual time=0.388..0.554 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
245. 3.559 125.916 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=124.407..125.916 rows=218 loops=1)

  • Sort Key: units_29.public_id
  • Sort Method: quicksort Memory: 42kB
246. 3.003 122.357 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.938..122.357 rows=218 loops=1)

247. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_19 (cost=0.15..8.17 rows=1 width=4) (actual time=0.019..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
248. 58.456 119.326 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.897..119.326 rows=218 loops=1)

  • Hash Cond: (units_29.campaign_id = campaigns_19.campaign_id)
249. 60.058 60.058 ↑ 1.0 7,900 1

Seq Scan on units units_29 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.612..60.058 rows=7,900 loops=1)

250. 0.121 0.812 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.812..0.812 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
251. 0.691 0.691 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_19 (cost=0.00..16.80 rows=12 width=8) (actual time=0.454..0.691 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
252. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_28 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_29.public_id)
  • Heap Fetches: 214
253. 0.022 361.363 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=51) (actual time=361.356..361.363 rows=1 loops=1)

254. 1.880 361.341 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=51) (actual time=361.341..361.341 rows=1 loops=1)

  • Sort Key: metric_summaries_10.negative_response_percentage DESC, metric_summaries_10.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
255. 7.199 359.461 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=51) (actual time=337.453..359.461 rows=214 loops=1)

  • Join Filter: (metric_summaries_10.survey_id = units_31.public_id)
256. 5.698 346.698 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=337.381..346.698 rows=214 loops=1)

  • Merge Cond: (metric_summaries_10.survey_id = units_32.public_id)
257. 3.737 213.414 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=211.727..213.414 rows=214 loops=1)

  • Sort Key: metric_summaries_10.survey_id
  • Sort Method: quicksort Memory: 41kB
258. 2.877 209.677 ↓ 1.1 214 1

Subquery Scan on metric_summaries_10 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=205.183..209.677 rows=214 loops=1)

259. 3.432 206.800 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=205.168..206.800 rows=214 loops=1)

  • Group Key: r_survey_summaries_10.survey_id
260. 39.821 203.368 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=127.862..203.368 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_10.survey_id = units_33.public_id)
261. 37.885 37.885 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_10 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.541..37.885 rows=5,302 loops=1)

262. 1.677 125.662 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.662..125.662 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
263. 3.248 123.985 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=122.491..123.985 rows=218 loops=1)

  • Group Key: units_33.public_id
264. 3.087 120.737 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.569..120.737 rows=218 loops=1)

265. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_22 (cost=0.15..8.17 rows=1 width=4) (actual time=0.014..0.023 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
266. 57.363 117.627 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.533..117.627 rows=218 loops=1)

  • Hash Cond: (units_33.campaign_id = campaigns_22.campaign_id)
267. 59.474 59.474 ↑ 1.0 7,900 1

Seq Scan on units units_33 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.445..59.474 rows=7,900 loops=1)

268. 0.156 0.790 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.790..0.790 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
269. 0.634 0.634 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_22 (cost=0.00..16.80 rows=12 width=8) (actual time=0.467..0.634 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
270. 4.294 127.586 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=125.623..127.586 rows=218 loops=1)

  • Sort Key: units_32.public_id
  • Sort Method: quicksort Memory: 42kB
271. 3.176 123.292 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.986..123.292 rows=218 loops=1)

272. 0.030 0.030 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_21 (cost=0.15..8.17 rows=1 width=4) (actual time=0.019..0.030 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
273. 58.528 120.086 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.942..120.086 rows=218 loops=1)

  • Hash Cond: (units_32.campaign_id = campaigns_21.campaign_id)
274. 60.605 60.605 ↑ 1.0 7,900 1

Seq Scan on units units_32 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.636..60.605 rows=7,900 loops=1)

275. 0.125 0.953 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.953..0.953 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
276. 0.828 0.828 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_21 (cost=0.00..16.80 rows=12 width=8) (actual time=0.483..0.828 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
277. 5.564 5.564 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_31 (cost=0.28..0.82 rows=1 width=60) (actual time=0.018..0.026 rows=1 loops=214)

  • Index Cond: (public_id = units_32.public_id)
278. 0.021 355.466 ↑ 1.0 1 1

Limit (cost=2,504.77..2,504.77 rows=1 width=16) (actual time=355.459..355.466 rows=1 loops=1)

279. 1.702 355.445 ↑ 100.0 1 1

Sort (cost=2,504.77..2,505.02 rows=100 width=16) (actual time=355.445..355.445 rows=1 loops=1)

  • Sort Key: metric_summaries_11.negative_response_percentage DESC, metric_summaries_11.num_page_views DESC
  • Sort Method: top-N heapsort Memory: 25kB
280. 6.391 353.743 ↓ 2.1 214 1

Nested Loop (cost=2,419.19..2,504.27 rows=100 width=16) (actual time=334.618..353.743 rows=214 loops=1)

  • Join Filter: (metric_summaries_11.survey_id = units_34.public_id)
281. 4.964 342.644 ↓ 2.1 214 1

Merge Semi Join (cost=2,418.91..2,420.62 rows=100 width=73) (actual time=334.561..342.644 rows=214 loops=1)

  • Merge Cond: (metric_summaries_11.survey_id = units_35.public_id)
282. 3.468 213.281 ↓ 1.1 214 1

Sort (cost=1,310.69..1,311.19 rows=200 width=48) (actual time=211.755..213.281 rows=214 loops=1)

  • Sort Key: metric_summaries_11.survey_id
  • Sort Method: quicksort Memory: 41kB
283. 2.864 209.813 ↓ 1.1 214 1

Subquery Scan on metric_summaries_11 (cost=1,297.05..1,303.05 rows=200 width=48) (actual time=205.326..209.813 rows=214 loops=1)

284. 3.376 206.949 ↓ 1.1 214 1

HashAggregate (cost=1,297.05..1,301.05 rows=200 width=68) (actual time=205.312..206.949 rows=214 loops=1)

  • Group Key: r_survey_summaries_11.survey_id
285. 39.700 203.573 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=44) (actual time=127.871..203.573 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_11.survey_id = units_36.public_id)
286. 38.086 38.086 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_11 (cost=0.00..150.52 rows=4,452 width=44) (actual time=0.486..38.086 rows=5,302 loops=1)

287. 1.594 125.787 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.787..125.787 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
288. 3.199 124.193 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=122.699..124.193 rows=218 loops=1)

  • Group Key: units_36.public_id
289. 2.996 120.994 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.233..120.994 rows=218 loops=1)

290. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_24 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
291. 58.091 117.973 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.148..117.973 rows=218 loops=1)

  • Hash Cond: (units_36.campaign_id = campaigns_24.campaign_id)
292. 59.340 59.340 ↑ 1.0 7,900 1

Seq Scan on units units_36 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.301..59.340 rows=7,900 loops=1)

293. 0.103 0.542 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.542..0.542 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
294. 0.439 0.439 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_24 (cost=0.00..16.80 rows=12 width=8) (actual time=0.271..0.439 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
295. 3.667 124.399 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=122.781..124.399 rows=218 loops=1)

  • Sort Key: units_35.public_id
  • Sort Method: quicksort Memory: 42kB
296. 3.061 120.732 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.356..120.732 rows=218 loops=1)

297. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_23 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
298. 58.060 117.645 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.317..117.645 rows=218 loops=1)

  • Hash Cond: (units_35.campaign_id = campaigns_23.campaign_id)
299. 59.024 59.024 ↑ 1.0 7,900 1

Seq Scan on units units_35 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.457..59.024 rows=7,900 loops=1)

300. 0.104 0.561 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.561..0.561 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
301. 0.457 0.457 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_23 (cost=0.00..16.80 rows=12 width=8) (actual time=0.290..0.457 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
302. 4.708 4.708 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_34 (cost=0.28..0.82 rows=1 width=25) (actual time=0.014..0.022 rows=1 loops=214)

  • Index Cond: (public_id = units_35.public_id)
  • Heap Fetches: 214
303. 0.020 363.411 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=36) (actual time=363.405..363.411 rows=1 loops=1)

304. 1.695 363.391 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=36) (actual time=363.391..363.391 rows=1 loops=1)

  • Sort Key: metric_summaries_12.total_seconds_on_page DESC
  • Sort Method: top-N heapsort Memory: 25kB
305. 6.480 361.696 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=36) (actual time=341.677..361.696 rows=214 loops=1)

  • Join Filter: (metric_summaries_12.survey_id = units_37.public_id)
306. 5.155 349.866 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=341.624..349.866 rows=214 loops=1)

  • Merge Cond: (metric_summaries_12.survey_id = units_38.public_id)
307. 3.450 219.150 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=217.602..219.150 rows=214 loops=1)

  • Sort Key: metric_summaries_12.survey_id
  • Sort Method: quicksort Memory: 41kB
308. 2.861 215.700 ↓ 1.1 214 1

Subquery Scan on metric_summaries_12 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=211.176..215.700 rows=214 loops=1)

309. 3.649 212.839 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=211.162..212.839 rows=214 loops=1)

  • Group Key: r_survey_summaries_12.survey_id
310. 41.521 209.190 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=131.796..209.190 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_12.survey_id = units_39.public_id)
311. 38.323 38.323 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_12 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.556..38.323 rows=5,302 loops=1)

312. 1.902 129.346 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=129.346..129.346 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
313. 3.795 127.444 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=125.582..127.444 rows=218 loops=1)

  • Group Key: units_39.public_id
314. 3.353 123.649 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.281..123.649 rows=218 loops=1)

315. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_26 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.023 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
316. 59.561 120.273 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.246..120.273 rows=218 loops=1)

  • Hash Cond: (units_39.campaign_id = campaigns_26.campaign_id)
317. 60.125 60.125 ↑ 1.0 7,900 1

Seq Scan on units units_39 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.360..60.125 rows=7,900 loops=1)

318. 0.104 0.587 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.587..0.587 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
319. 0.483 0.483 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_26 (cost=0.00..16.80 rows=12 width=8) (actual time=0.313..0.483 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
320. 3.578 125.561 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=123.996..125.561 rows=218 loops=1)

  • Sort Key: units_38.public_id
  • Sort Method: quicksort Memory: 42kB
321. 3.036 121.983 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=2.252..121.983 rows=218 loops=1)

322. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_25 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
323. 58.954 118.920 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=2.212..118.920 rows=218 loops=1)

  • Hash Cond: (units_38.campaign_id = campaigns_25.campaign_id)
324. 58.819 58.819 ↑ 1.0 7,900 1

Seq Scan on units units_38 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.674..58.819 rows=7,900 loops=1)

325. 0.113 1.147 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=1.147..1.147 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
326. 1.034 1.034 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_25 (cost=0.00..16.80 rows=12 width=8) (actual time=0.801..1.034 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
327. 5.350 5.350 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_37 (cost=0.28..0.82 rows=1 width=25) (actual time=0.017..0.025 rows=1 loops=214)

  • Index Cond: (public_id = units_38.public_id)
  • Heap Fetches: 214
328. 0.021 362.348 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=39) (actual time=362.341..362.348 rows=1 loops=1)

329. 1.634 362.327 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=39) (actual time=362.327..362.327 rows=1 loops=1)

  • Sort Key: metric_summaries_13.total_seconds_on_page DESC
  • Sort Method: top-N heapsort Memory: 25kB
330. 6.350 360.693 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=39) (actual time=342.061..360.693 rows=214 loops=1)

  • Join Filter: (metric_summaries_13.survey_id = units_40.public_id)
331. 4.801 349.849 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=342.002..349.849 rows=214 loops=1)

  • Merge Cond: (metric_summaries_13.survey_id = units_41.public_id)
332. 3.426 215.015 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=213.519..215.015 rows=214 loops=1)

  • Sort Key: metric_summaries_13.survey_id
  • Sort Method: quicksort Memory: 41kB
333. 2.870 211.589 ↓ 1.1 214 1

Subquery Scan on metric_summaries_13 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=207.064..211.589 rows=214 loops=1)

334. 3.702 208.719 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=207.050..208.719 rows=214 loops=1)

  • Group Key: r_survey_summaries_13.survey_id
335. 40.625 205.017 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=127.731..205.017 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_13.survey_id = units_42.public_id)
336. 38.780 38.780 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_13 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.491..38.780 rows=5,302 loops=1)

337. 1.696 125.612 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.612..125.612 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
338. 3.214 123.916 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=122.377..123.916 rows=218 loops=1)

  • Group Key: units_42.public_id
339. 2.944 120.702 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.302..120.702 rows=218 loops=1)

340. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_28 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.023 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
341. 57.877 117.735 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.266..117.735 rows=218 loops=1)

  • Hash Cond: (units_42.campaign_id = campaigns_28.campaign_id)
342. 59.254 59.254 ↑ 1.0 7,900 1

Seq Scan on units units_42 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.354..59.254 rows=7,900 loops=1)

343. 0.109 0.604 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.604..0.604 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
344. 0.495 0.495 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_28 (cost=0.00..16.80 rows=12 width=8) (actual time=0.331..0.495 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
345. 3.830 130.033 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=128.457..130.033 rows=218 loops=1)

  • Sort Key: units_41.public_id
  • Sort Method: quicksort Memory: 42kB
346. 3.090 126.203 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.509..126.203 rows=218 loops=1)

347. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_27 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
348. 60.813 123.087 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.470..123.087 rows=218 loops=1)

  • Hash Cond: (units_41.campaign_id = campaigns_27.campaign_id)
349. 61.683 61.683 ↑ 1.0 7,900 1

Seq Scan on units units_41 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.578..61.683 rows=7,900 loops=1)

350. 0.108 0.591 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.591..0.591 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
351. 0.483 0.483 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_27 (cost=0.00..16.80 rows=12 width=8) (actual time=0.315..0.483 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
352. 4.494 4.494 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_40 (cost=0.28..0.82 rows=1 width=60) (actual time=0.014..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_41.public_id)
353. 0.019 350.890 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=4) (actual time=350.884..350.890 rows=1 loops=1)

354. 1.555 350.871 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=4) (actual time=350.871..350.871 rows=1 loops=1)

  • Sort Key: metric_summaries_14.total_seconds_on_page DESC
  • Sort Method: top-N heapsort Memory: 25kB
355. 6.186 349.316 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=4) (actual time=331.085..349.316 rows=214 loops=1)

  • Join Filter: (metric_summaries_14.survey_id = units_43.public_id)
356. 4.780 338.850 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=331.026..338.850 rows=214 loops=1)

  • Merge Cond: (metric_summaries_14.survey_id = units_44.public_id)
357. 3.595 211.365 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=209.789..211.365 rows=214 loops=1)

  • Sort Key: metric_summaries_14.survey_id
  • Sort Method: quicksort Memory: 41kB
358. 3.008 207.770 ↓ 1.1 214 1

Subquery Scan on metric_summaries_14 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=203.095..207.770 rows=214 loops=1)

359. 3.485 204.762 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=203.080..204.762 rows=214 loops=1)

  • Group Key: r_survey_summaries_14.survey_id
360. 39.224 201.277 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=126.748..201.277 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_14.survey_id = units_45.public_id)
361. 37.432 37.432 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_14 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.535..37.432 rows=5,302 loops=1)

362. 1.743 124.621 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=124.621..124.621 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
363. 3.450 122.878 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=121.199..122.878 rows=218 loops=1)

  • Group Key: units_45.public_id
364. 2.979 119.428 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.271..119.428 rows=218 loops=1)

365. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_30 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
366. 57.345 116.427 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.236..116.427 rows=218 loops=1)

  • Hash Cond: (units_45.campaign_id = campaigns_30.campaign_id)
367. 58.454 58.454 ↑ 1.0 7,900 1

Seq Scan on units units_45 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.309..58.454 rows=7,900 loops=1)

368. 0.105 0.628 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.628..0.628 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
369. 0.523 0.523 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_30 (cost=0.00..16.80 rows=12 width=8) (actual time=0.353..0.523 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
370. 3.509 122.705 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=121.212..122.705 rows=218 loops=1)

  • Sort Key: units_44.public_id
  • Sort Method: quicksort Memory: 42kB
371. 3.014 119.196 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.423..119.196 rows=218 loops=1)

372. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_29 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.027 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
373. 57.509 116.155 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.383..116.155 rows=218 loops=1)

  • Hash Cond: (units_44.campaign_id = campaigns_29.campaign_id)
374. 58.076 58.076 ↑ 1.0 7,900 1

Seq Scan on units units_44 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.498..58.076 rows=7,900 loops=1)

375. 0.105 0.570 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.570..0.570 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
376. 0.465 0.465 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_29 (cost=0.00..16.80 rows=12 width=8) (actual time=0.299..0.465 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
377. 4.280 4.280 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_43 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_44.public_id)
  • Heap Fetches: 214
378. 0.021 350.028 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=36) (actual time=350.021..350.028 rows=1 loops=1)

379. 1.565 350.007 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=36) (actual time=350.007..350.007 rows=1 loops=1)

  • Sort Key: metric_summaries_15.total_seconds_on_page
  • Sort Method: top-N heapsort Memory: 25kB
380. 5.935 348.442 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=36) (actual time=330.647..348.442 rows=214 loops=1)

  • Join Filter: (metric_summaries_15.survey_id = units_46.public_id)
381. 4.680 338.227 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=330.591..338.227 rows=214 loops=1)

  • Merge Cond: (metric_summaries_15.survey_id = units_47.public_id)
382. 3.400 211.160 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=209.661..211.160 rows=214 loops=1)

  • Sort Key: metric_summaries_15.survey_id
  • Sort Method: quicksort Memory: 41kB
383. 2.866 207.760 ↓ 1.1 214 1

Subquery Scan on metric_summaries_15 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=203.209..207.760 rows=214 loops=1)

384. 3.451 204.894 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=203.195..204.894 rows=214 loops=1)

  • Group Key: r_survey_summaries_15.survey_id
385. 39.970 201.443 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=126.531..201.443 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_15.survey_id = units_48.public_id)
386. 37.033 37.033 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_15 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.492..37.033 rows=5,302 loops=1)

387. 1.796 124.440 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=124.440..124.440 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
388. 3.329 122.644 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=120.984..122.644 rows=218 loops=1)

  • Group Key: units_48.public_id
389. 2.951 119.315 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.370..119.315 rows=218 loops=1)

390. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_32 (cost=0.15..8.17 rows=1 width=4) (actual time=0.014..0.023 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
391. 57.554 116.341 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.312..116.341 rows=218 loops=1)

  • Hash Cond: (units_48.campaign_id = campaigns_32.campaign_id)
392. 58.168 58.168 ↑ 1.0 7,900 1

Seq Scan on units units_48 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.375..58.168 rows=7,900 loops=1)

393. 0.128 0.619 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.619..0.619 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
394. 0.491 0.491 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_32 (cost=0.00..16.80 rows=12 width=8) (actual time=0.322..0.491 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
395. 3.752 122.387 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=120.905..122.387 rows=218 loops=1)

  • Sort Key: units_47.public_id
  • Sort Method: quicksort Memory: 42kB
396. 2.966 118.635 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.411..118.635 rows=218 loops=1)

397. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_31 (cost=0.15..8.17 rows=1 width=4) (actual time=0.018..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
398. 57.084 115.641 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.371..115.641 rows=218 loops=1)

  • Hash Cond: (units_47.campaign_id = campaigns_31.campaign_id)
399. 57.954 57.954 ↑ 1.0 7,900 1

Seq Scan on units units_47 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.466..57.954 rows=7,900 loops=1)

400. 0.106 0.603 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.603..0.603 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
401. 0.497 0.497 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_31 (cost=0.00..16.80 rows=12 width=8) (actual time=0.311..0.497 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
402. 4.280 4.280 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_46 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_47.public_id)
  • Heap Fetches: 214
403. 0.021 355.629 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=39) (actual time=355.622..355.629 rows=1 loops=1)

404. 1.564 355.608 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=39) (actual time=355.608..355.608 rows=1 loops=1)

  • Sort Key: metric_summaries_16.total_seconds_on_page
  • Sort Method: top-N heapsort Memory: 25kB
405. 5.941 354.044 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=39) (actual time=336.171..354.044 rows=214 loops=1)

  • Join Filter: (metric_summaries_16.survey_id = units_49.public_id)
406. 4.660 343.823 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=336.114..343.823 rows=214 loops=1)

  • Merge Cond: (metric_summaries_16.survey_id = units_50.public_id)
407. 3.500 215.981 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=214.453..215.981 rows=214 loops=1)

  • Sort Key: metric_summaries_16.survey_id
  • Sort Method: quicksort Memory: 41kB
408. 2.923 212.481 ↓ 1.1 214 1

Subquery Scan on metric_summaries_16 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=207.888..212.481 rows=214 loops=1)

409. 3.549 209.558 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=207.874..209.558 rows=214 loops=1)

  • Group Key: r_survey_summaries_16.survey_id
410. 41.163 206.009 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=127.408..206.009 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_16.survey_id = units_51.public_id)
411. 39.578 39.578 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_16 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.528..39.578 rows=5,302 loops=1)

412. 1.764 125.268 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.268..125.268 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
413. 3.395 123.504 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=121.864..123.504 rows=218 loops=1)

  • Group Key: units_51.public_id
414. 3.102 120.109 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.399..120.109 rows=218 loops=1)

415. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_34 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
416. 57.787 116.985 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.364..116.985 rows=218 loops=1)

  • Hash Cond: (units_51.campaign_id = campaigns_34.campaign_id)
417. 58.528 58.528 ↑ 1.0 7,900 1

Seq Scan on units units_51 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.373..58.528 rows=7,900 loops=1)

418. 0.108 0.670 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.670..0.670 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
419. 0.562 0.562 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_34 (cost=0.00..16.80 rows=12 width=8) (actual time=0.372..0.562 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
420. 3.610 123.182 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=121.637..123.182 rows=218 loops=1)

  • Sort Key: units_50.public_id
  • Sort Method: quicksort Memory: 42kB
421. 3.023 119.572 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.532..119.572 rows=218 loops=1)

422. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_33 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
423. 57.719 116.523 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.492..116.523 rows=218 loops=1)

  • Hash Cond: (units_50.campaign_id = campaigns_33.campaign_id)
424. 58.103 58.103 ↑ 1.0 7,900 1

Seq Scan on units units_50 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.494..58.103 rows=7,900 loops=1)

425. 0.109 0.701 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.701..0.701 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
426. 0.592 0.592 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_33 (cost=0.00..16.80 rows=12 width=8) (actual time=0.426..0.592 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
427. 4.280 4.280 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_49 (cost=0.28..0.82 rows=1 width=60) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_50.public_id)
428. 0.022 349.443 ↑ 1.0 1 1

Limit (cost=2,492.64..2,492.64 rows=1 width=4) (actual time=349.436..349.443 rows=1 loops=1)

429. 1.560 349.421 ↑ 100.0 1 1

Sort (cost=2,492.64..2,492.89 rows=100 width=4) (actual time=349.421..349.421 rows=1 loops=1)

  • Sort Key: metric_summaries_17.total_seconds_on_page
  • Sort Method: top-N heapsort Memory: 25kB
430. 6.032 347.861 ↓ 2.1 214 1

Nested Loop (cost=2,407.06..2,492.14 rows=100 width=4) (actual time=329.990..347.861 rows=214 loops=1)

  • Join Filter: (metric_summaries_17.survey_id = units_52.public_id)
431. 4.689 337.549 ↓ 2.1 214 1

Merge Semi Join (cost=2,406.78..2,408.49 rows=100 width=61) (actual time=329.932..337.549 rows=214 loops=1)

  • Merge Cond: (metric_summaries_17.survey_id = units_53.public_id)
432. 3.394 210.606 ↓ 1.1 214 1

Sort (cost=1,298.56..1,299.06 rows=200 width=36) (actual time=209.140..210.606 rows=214 loops=1)

  • Sort Key: metric_summaries_17.survey_id
  • Sort Method: quicksort Memory: 41kB
433. 2.856 207.212 ↓ 1.1 214 1

Subquery Scan on metric_summaries_17 (cost=1,285.92..1,290.92 rows=200 width=36) (actual time=202.632..207.212 rows=214 loops=1)

434. 3.596 204.356 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,288.92 rows=200 width=68) (actual time=202.618..204.356 rows=214 loops=1)

  • Group Key: r_survey_summaries_17.survey_id
435. 39.377 200.760 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=40) (actual time=126.083..200.760 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_17.survey_id = units_54.public_id)
436. 37.771 37.771 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_17 (cost=0.00..150.52 rows=4,452 width=40) (actual time=0.735..37.771 rows=5,302 loops=1)

437. 1.772 123.612 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=123.612..123.612 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
438. 3.205 121.840 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=120.330..121.840 rows=218 loops=1)

  • Group Key: units_54.public_id
439. 2.946 118.635 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.331..118.635 rows=218 loops=1)

440. 0.047 0.047 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_36 (cost=0.15..8.17 rows=1 width=4) (actual time=0.037..0.047 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
441. 56.961 115.642 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.272..115.642 rows=218 loops=1)

  • Hash Cond: (units_54.campaign_id = campaigns_36.campaign_id)
442. 58.133 58.133 ↑ 1.0 7,900 1

Seq Scan on units units_54 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.409..58.133 rows=7,900 loops=1)

443. 0.124 0.548 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.548..0.548 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
444. 0.424 0.424 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_36 (cost=0.00..16.80 rows=12 width=8) (actual time=0.257..0.424 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
445. 3.533 122.254 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=120.767..122.254 rows=218 loops=1)

  • Sort Key: units_53.public_id
  • Sort Method: quicksort Memory: 42kB
446. 2.944 118.721 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.531..118.721 rows=218 loops=1)

447. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_35 (cost=0.15..8.17 rows=1 width=4) (actual time=0.017..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
448. 56.947 115.751 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.492..115.751 rows=218 loops=1)

  • Hash Cond: (units_53.campaign_id = campaigns_35.campaign_id)
449. 58.117 58.117 ↑ 1.0 7,900 1

Seq Scan on units units_53 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.479..58.117 rows=7,900 loops=1)

450. 0.106 0.687 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.687..0.687 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
451. 0.581 0.581 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_35 (cost=0.00..16.80 rows=12 width=8) (actual time=0.362..0.581 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
452. 4.280 4.280 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_52 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_53.public_id)
  • Heap Fetches: 214
453. 0.021 354.017 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=40) (actual time=354.010..354.017 rows=1 loops=1)

454. 1.648 353.996 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=40) (actual time=353.996..353.996 rows=1 loops=1)

  • Sort Key: metric_summaries_18.num_responses DESC
  • Sort Method: top-N heapsort Memory: 25kB
455. 6.099 352.348 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=40) (actual time=334.033..352.348 rows=214 loops=1)

  • Join Filter: (metric_summaries_18.survey_id = units_55.public_id)
456. 4.838 341.755 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=333.978..341.755 rows=214 loops=1)

  • Merge Cond: (metric_summaries_18.survey_id = units_56.public_id)
457. 3.496 212.887 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=211.418..212.887 rows=214 loops=1)

  • Sort Key: metric_summaries_18.survey_id
  • Sort Method: quicksort Memory: 41kB
458. 3.021 209.391 ↓ 1.1 214 1

Subquery Scan on metric_summaries_18 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=204.794..209.391 rows=214 loops=1)

459. 3.309 206.370 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=204.780..206.370 rows=214 loops=1)

  • Group Key: r_survey_summaries_18.survey_id
460. 39.988 203.061 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=127.111..203.061 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_18.survey_id = units_57.public_id)
461. 38.148 38.148 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_18 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.461..38.148 rows=5,302 loops=1)

462. 1.602 124.925 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=124.925..124.925 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
463. 3.306 123.323 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=121.810..123.323 rows=218 loops=1)

  • Group Key: units_57.public_id
464. 3.177 120.017 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.359..120.017 rows=218 loops=1)

465. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_38 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
466. 57.522 116.815 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.321..116.815 rows=218 loops=1)

  • Hash Cond: (units_57.campaign_id = campaigns_38.campaign_id)
467. 58.593 58.593 ↑ 1.0 7,900 1

Seq Scan on units units_57 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.326..58.593 rows=7,900 loops=1)

468. 0.106 0.700 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.700..0.700 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
469. 0.594 0.594 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_38 (cost=0.00..16.80 rows=12 width=8) (actual time=0.425..0.594 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
470. 3.471 124.030 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=122.535..124.030 rows=218 loops=1)

  • Sort Key: units_56.public_id
  • Sort Method: quicksort Memory: 42kB
471. 2.976 120.559 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.509..120.559 rows=218 loops=1)

472. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_37 (cost=0.15..8.17 rows=1 width=4) (actual time=0.019..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
473. 58.171 117.555 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.468..117.555 rows=218 loops=1)

  • Hash Cond: (units_56.campaign_id = campaigns_37.campaign_id)
474. 58.704 58.704 ↑ 1.0 7,900 1

Seq Scan on units units_56 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.458..58.704 rows=7,900 loops=1)

475. 0.136 0.680 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.680..0.680 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
476. 0.544 0.544 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_37 (cost=0.00..16.80 rows=12 width=8) (actual time=0.376..0.544 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
477. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_55 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_56.public_id)
  • Heap Fetches: 214
478. 0.021 358.907 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=43) (actual time=358.900..358.907 rows=1 loops=1)

479. 1.581 358.886 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=43) (actual time=358.886..358.886 rows=1 loops=1)

  • Sort Key: metric_summaries_19.num_responses DESC
  • Sort Method: top-N heapsort Memory: 25kB
480. 6.088 357.305 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=43) (actual time=339.072..357.305 rows=214 loops=1)

  • Join Filter: (metric_summaries_19.survey_id = units_58.public_id)
481. 4.936 346.937 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=339.001..346.937 rows=214 loops=1)

  • Merge Cond: (metric_summaries_19.survey_id = units_59.public_id)
482. 3.511 214.779 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=213.297..214.779 rows=214 loops=1)

  • Sort Key: metric_summaries_19.survey_id
  • Sort Method: quicksort Memory: 41kB
483. 2.917 211.268 ↓ 1.1 214 1

Subquery Scan on metric_summaries_19 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=206.854..211.268 rows=214 loops=1)

484. 3.342 208.351 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=206.839..208.351 rows=214 loops=1)

  • Group Key: r_survey_summaries_19.survey_id
485. 42.462 205.009 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=125.666..205.009 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_19.survey_id = units_60.public_id)
486. 39.017 39.017 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_19 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.488..39.017 rows=5,302 loops=1)

487. 1.815 123.530 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=123.530..123.530 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
488. 3.490 121.715 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=120.051..121.715 rows=218 loops=1)

  • Group Key: units_60.public_id
489. 2.940 118.225 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.201..118.225 rows=218 loops=1)

490. 0.021 0.021 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_40 (cost=0.15..8.17 rows=1 width=4) (actual time=0.012..0.021 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
491. 57.063 115.264 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.168..115.264 rows=218 loops=1)

  • Hash Cond: (units_60.campaign_id = campaigns_40.campaign_id)
492. 57.653 57.653 ↑ 1.0 7,900 1

Seq Scan on units units_60 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.301..57.653 rows=7,900 loops=1)

493. 0.115 0.548 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.548..0.548 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
494. 0.433 0.433 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_40 (cost=0.00..16.80 rows=12 width=8) (actual time=0.247..0.433 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
495. 3.710 127.222 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=125.678..127.222 rows=218 loops=1)

  • Sort Key: units_59.public_id
  • Sort Method: quicksort Memory: 42kB
496. 3.151 123.512 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.465..123.512 rows=218 loops=1)

497. 0.033 0.033 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_39 (cost=0.15..8.17 rows=1 width=4) (actual time=0.023..0.033 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
498. 59.537 120.328 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.419..120.328 rows=218 loops=1)

  • Hash Cond: (units_59.campaign_id = campaigns_39.campaign_id)
499. 60.203 60.203 ↑ 1.0 7,900 1

Seq Scan on units units_59 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.504..60.203 rows=7,900 loops=1)

500. 0.113 0.588 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.588..0.588 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
501. 0.475 0.475 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_39 (cost=0.00..16.80 rows=12 width=8) (actual time=0.279..0.475 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
502. 4.280 4.280 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_58 (cost=0.28..0.82 rows=1 width=60) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_59.public_id)
503. 0.021 358.116 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=8) (actual time=358.109..358.116 rows=1 loops=1)

504. 1.536 358.095 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=8) (actual time=358.095..358.095 rows=1 loops=1)

  • Sort Key: metric_summaries_20.num_responses DESC
  • Sort Method: top-N heapsort Memory: 25kB
505. 6.013 356.559 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=8) (actual time=338.363..356.559 rows=214 loops=1)

  • Join Filter: (metric_summaries_20.survey_id = units_61.public_id)
506. 4.754 346.052 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=338.312..346.052 rows=214 loops=1)

  • Merge Cond: (metric_summaries_20.survey_id = units_62.public_id)
507. 3.555 216.009 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=214.490..216.009 rows=214 loops=1)

  • Sort Key: metric_summaries_20.survey_id
  • Sort Method: quicksort Memory: 41kB
508. 3.114 212.454 ↓ 1.1 214 1

Subquery Scan on metric_summaries_20 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=207.785..212.454 rows=214 loops=1)

509. 3.511 209.340 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=207.770..209.340 rows=214 loops=1)

  • Group Key: r_survey_summaries_20.survey_id
510. 41.190 205.829 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=127.588..205.829 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_20.survey_id = units_63.public_id)
511. 39.089 39.089 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_20 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.450..39.089 rows=5,302 loops=1)

512. 1.615 125.550 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=125.550..125.550 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
513. 3.376 123.935 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=122.308..123.935 rows=218 loops=1)

  • Group Key: units_63.public_id
514. 2.991 120.559 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.596..120.559 rows=218 loops=1)

515. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_42 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
516. 58.440 117.546 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.561..117.546 rows=218 loops=1)

  • Hash Cond: (units_63.campaign_id = campaigns_42.campaign_id)
517. 58.362 58.362 ↑ 1.0 7,900 1

Seq Scan on units units_63 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.513..58.362 rows=7,900 loops=1)

518. 0.213 0.744 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.744..0.744 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
519. 0.531 0.531 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_42 (cost=0.00..16.80 rows=12 width=8) (actual time=0.364..0.531 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
520. 3.631 125.289 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=123.796..125.289 rows=218 loops=1)

  • Sort Key: units_62.public_id
  • Sort Method: quicksort Memory: 42kB
521. 3.369 121.658 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.869..121.658 rows=218 loops=1)

522. 0.030 0.030 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_41 (cost=0.15..8.17 rows=1 width=4) (actual time=0.021..0.030 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
523. 58.036 118.259 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.826..118.259 rows=218 loops=1)

  • Hash Cond: (units_62.campaign_id = campaigns_41.campaign_id)
524. 59.391 59.391 ↑ 1.0 7,900 1

Seq Scan on units units_62 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.643..59.391 rows=7,900 loops=1)

525. 0.119 0.832 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.832..0.832 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
526. 0.713 0.713 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_41 (cost=0.00..16.80 rows=12 width=8) (actual time=0.502..0.713 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
527. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_61 (cost=0.28..0.82 rows=1 width=25) (actual time=0.014..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_62.public_id)
  • Heap Fetches: 214
528. 0.019 351.688 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=40) (actual time=351.682..351.688 rows=1 loops=1)

529. 1.567 351.669 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=40) (actual time=351.669..351.669 rows=1 loops=1)

  • Sort Key: metric_summaries_21.num_responses
  • Sort Method: top-N heapsort Memory: 25kB
530. 6.084 350.102 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=40) (actual time=331.720..350.102 rows=214 loops=1)

  • Join Filter: (metric_summaries_21.survey_id = units_64.public_id)
531. 4.801 339.524 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=331.664..339.524 rows=214 loops=1)

  • Merge Cond: (metric_summaries_21.survey_id = units_65.public_id)
532. 3.414 212.058 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=210.553..212.058 rows=214 loops=1)

  • Sort Key: metric_summaries_21.survey_id
  • Sort Method: quicksort Memory: 41kB
533. 2.919 208.644 ↓ 1.1 214 1

Subquery Scan on metric_summaries_21 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=203.984..208.644 rows=214 loops=1)

534. 3.485 205.725 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=203.970..205.725 rows=214 loops=1)

  • Group Key: r_survey_summaries_21.survey_id
535. 40.273 202.240 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=126.747..202.240 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_21.survey_id = units_66.public_id)
536. 37.385 37.385 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_21 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.477..37.385 rows=5,302 loops=1)

537. 1.630 124.582 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=124.582..124.582 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
538. 3.230 122.952 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=121.407..122.952 rows=218 loops=1)

  • Group Key: units_66.public_id
539. 2.946 119.722 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.205..119.722 rows=218 loops=1)

540. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_44 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
541. 57.653 116.754 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.171..116.754 rows=218 loops=1)

  • Hash Cond: (units_66.campaign_id = campaigns_44.campaign_id)
542. 58.517 58.517 ↑ 1.0 7,900 1

Seq Scan on units units_66 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.288..58.517 rows=7,900 loops=1)

543. 0.136 0.584 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.584..0.584 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
544. 0.448 0.448 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_44 (cost=0.00..16.80 rows=12 width=8) (actual time=0.255..0.448 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
545. 3.628 122.665 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=121.085..122.665 rows=218 loops=1)

  • Sort Key: units_65.public_id
  • Sort Method: quicksort Memory: 42kB
546. 2.962 119.037 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.436..119.037 rows=218 loops=1)

547. 0.028 0.028 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_43 (cost=0.15..8.17 rows=1 width=4) (actual time=0.019..0.028 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
548. 57.578 116.047 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.395..116.047 rows=218 loops=1)

  • Hash Cond: (units_65.campaign_id = campaigns_43.campaign_id)
549. 57.857 57.857 ↑ 1.0 7,900 1

Seq Scan on units units_65 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.480..57.857 rows=7,900 loops=1)

550. 0.104 0.612 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.612..0.612 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
551. 0.508 0.508 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_43 (cost=0.00..16.80 rows=12 width=8) (actual time=0.318..0.508 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
552. 4.494 4.494 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_64 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_65.public_id)
  • Heap Fetches: 214
553. 0.021 354.593 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=43) (actual time=354.586..354.593 rows=1 loops=1)

554. 1.569 354.572 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=43) (actual time=354.572..354.572 rows=1 loops=1)

  • Sort Key: metric_summaries_22.num_responses
  • Sort Method: top-N heapsort Memory: 25kB
555. 6.071 353.003 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=43) (actual time=334.686..353.003 rows=214 loops=1)

  • Join Filter: (metric_summaries_22.survey_id = units_67.public_id)
556. 4.843 342.438 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=334.631..342.438 rows=214 loops=1)

  • Merge Cond: (metric_summaries_22.survey_id = units_68.public_id)
557. 3.504 214.536 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=213.030..214.536 rows=214 loops=1)

  • Sort Key: metric_summaries_22.survey_id
  • Sort Method: quicksort Memory: 41kB
558. 2.968 211.032 ↓ 1.1 214 1

Subquery Scan on metric_summaries_22 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=206.545..211.032 rows=214 loops=1)

559. 3.348 208.064 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=206.516..208.064 rows=214 loops=1)

  • Group Key: r_survey_summaries_22.survey_id
560. 39.613 204.716 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=129.609..204.716 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_22.survey_id = units_69.public_id)
561. 37.525 37.525 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_22 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.445..37.525 rows=5,302 loops=1)

562. 1.625 127.578 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=127.578..127.578 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
563. 3.275 125.953 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=124.462..125.953 rows=218 loops=1)

  • Group Key: units_69.public_id
564. 2.984 122.678 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.312..122.678 rows=218 loops=1)

565. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_46 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.022 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
566. 58.522 119.672 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.279..119.672 rows=218 loops=1)

  • Hash Cond: (units_69.campaign_id = campaigns_46.campaign_id)
567. 60.564 60.564 ↑ 1.0 7,900 1

Seq Scan on units units_69 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.321..60.564 rows=7,900 loops=1)

568. 0.105 0.586 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.586..0.586 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
569. 0.481 0.481 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_46 (cost=0.00..16.80 rows=12 width=8) (actual time=0.315..0.481 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
570. 3.512 123.059 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=121.576..123.059 rows=218 loops=1)

  • Sort Key: units_68.public_id
  • Sort Method: quicksort Memory: 42kB
571. 3.001 119.547 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.450..119.547 rows=218 loops=1)

572. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_45 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
573. 57.446 116.521 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.412..116.521 rows=218 loops=1)

  • Hash Cond: (units_68.campaign_id = campaigns_45.campaign_id)
574. 58.346 58.346 ↑ 1.0 7,900 1

Seq Scan on units units_68 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.382..58.346 rows=7,900 loops=1)

575. 0.157 0.729 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.729..0.729 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
576. 0.572 0.572 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_45 (cost=0.00..16.80 rows=12 width=8) (actual time=0.402..0.572 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
577. 4.494 4.494 ↑ 1.0 1 214

Index Scan using units_mongo_id_key on units units_67 (cost=0.28..0.82 rows=1 width=60) (actual time=0.014..0.021 rows=1 loops=214)

  • Index Cond: (public_id = units_68.public_id)
578. 0.019 356.933 ↑ 1.0 1 1

Limit (cost=2,491.64..2,491.64 rows=1 width=8) (actual time=356.927..356.933 rows=1 loops=1)

579. 1.648 356.914 ↑ 100.0 1 1

Sort (cost=2,491.64..2,491.89 rows=100 width=8) (actual time=356.914..356.914 rows=1 loops=1)

  • Sort Key: metric_summaries_23.num_responses
  • Sort Method: top-N heapsort Memory: 25kB
580. 6.473 355.266 ↓ 2.1 214 1

Nested Loop (cost=2,406.06..2,491.14 rows=100 width=8) (actual time=336.714..355.266 rows=214 loops=1)

  • Join Filter: (metric_summaries_23.survey_id = units_70.public_id)
581. 4.856 344.513 ↓ 2.1 214 1

Merge Semi Join (cost=2,405.78..2,407.49 rows=100 width=65) (actual time=336.649..344.513 rows=214 loops=1)

  • Merge Cond: (metric_summaries_23.survey_id = units_71.public_id)
582. 3.444 213.984 ↓ 1.1 214 1

Sort (cost=1,297.56..1,298.06 rows=200 width=40) (actual time=212.464..213.984 rows=214 loops=1)

  • Sort Key: metric_summaries_23.survey_id
  • Sort Method: quicksort Memory: 41kB
583. 2.927 210.540 ↓ 1.1 214 1

Subquery Scan on metric_summaries_23 (cost=1,285.92..1,289.92 rows=200 width=40) (actual time=206.121..210.540 rows=214 loops=1)

584. 3.313 207.613 ↓ 1.1 214 1

HashAggregate (cost=1,285.92..1,287.92 rows=200 width=68) (actual time=206.107..207.613 rows=214 loops=1)

  • Group Key: r_survey_summaries_23.survey_id
585. 39.497 204.300 ↑ 10.4 214 1

Hash Join (cost=1,106.81..1,274.79 rows=2,226 width=36) (actual time=128.584..204.300 rows=214 loops=1)

  • Hash Cond: (r_survey_summaries_23.survey_id = units_72.public_id)
586. 38.224 38.224 ↓ 1.2 5,302 1

Seq Scan on r_survey_summaries r_survey_summaries_23 (cost=0.00..150.52 rows=4,452 width=36) (actual time=0.415..38.224 rows=5,302 loops=1)

587. 1.613 126.579 ↓ 1.6 218 1

Hash (cost=1,105.13..1,105.13 rows=135 width=25) (actual time=126.579..126.579 rows=218 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
588. 3.366 124.966 ↓ 1.6 218 1

HashAggregate (cost=1,103.78..1,105.13 rows=135 width=25) (actual time=123.458..124.966 rows=218 loops=1)

  • Group Key: units_72.public_id
589. 2.937 121.600 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.205..121.600 rows=218 loops=1)

590. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_48 (cost=0.15..8.17 rows=1 width=4) (actual time=0.013..0.023 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
591. 58.522 118.640 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.171..118.640 rows=218 loops=1)

  • Hash Cond: (units_72.campaign_id = campaigns_48.campaign_id)
592. 59.546 59.546 ↑ 1.0 7,900 1

Seq Scan on units units_72 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.299..59.546 rows=7,900 loops=1)

593. 0.134 0.572 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.572..0.572 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
594. 0.438 0.438 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_48 (cost=0.00..16.80 rows=12 width=8) (actual time=0.267..0.438 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
595. 3.549 125.673 ↓ 1.6 218 1

Sort (cost=1,108.22..1,108.55 rows=135 width=25) (actual time=124.159..125.673 rows=218 loops=1)

  • Sort Key: units_71.public_id
  • Sort Method: quicksort Memory: 42kB
596. 2.933 122.124 ↓ 1.6 218 1

Nested Loop (cost=17.10..1,103.44 rows=135 width=25) (actual time=1.525..122.124 rows=218 loops=1)

597. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using accounts_pkey on accounts accounts_47 (cost=0.15..8.17 rows=1 width=4) (actual time=0.016..0.026 rows=1 loops=1)

  • Index Cond: (account_id = 631)
  • Heap Fetches: 1
598. 59.250 119.165 ↓ 1.6 218 1

Hash Join (cost=16.95..1,093.92 rows=135 width=29) (actual time=1.487..119.165 rows=218 loops=1)

  • Hash Cond: (units_71.campaign_id = campaigns_47.campaign_id)
599. 59.271 59.271 ↑ 1.0 7,900 1

Seq Scan on units units_71 (cost=0.00..1,046.00 rows=7,900 width=29) (actual time=0.542..59.271 rows=7,900 loops=1)

600. 0.106 0.644 ↑ 1.0 12 1

Hash (cost=16.80..16.80 rows=12 width=8) (actual time=0.644..0.644 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
601. 0.538 0.538 ↑ 1.0 12 1

Seq Scan on campaigns campaigns_47 (cost=0.00..16.80 rows=12 width=8) (actual time=0.330..0.538 rows=12 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 688
602. 4.280 4.280 ↑ 1.0 1 214

Index Only Scan using units_mongo_id_key on units units_70 (cost=0.28..0.82 rows=1 width=25) (actual time=0.013..0.020 rows=1 loops=214)

  • Index Cond: (public_id = units_71.public_id)
  • Heap Fetches: 214
603. 8,604.692 8,613.096 ↑ 135.0 1 1

Nested Loop (cost=0.00..2,519.55 rows=135 width=568) (actual time=8,613.096..8,613.096 rows=1 loops=1)

  • Join Filter: (campaigns.campaign_id = units.campaign_id)
  • Rows Removed by Join Filter: 297
604. 0.022 1.224 ↑ 12.0 1 1

Nested Loop (cost=0.00..31.80 rows=12 width=4) (actual time=1.224..1.224 rows=1 loops=1)

605. 0.698 0.698 ↑ 1.0 1 1

Seq Scan on accounts (cost=0.00..14.88 rows=1 width=4) (actual time=0.698..0.698 rows=1 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 8
606. 0.504 0.504 ↑ 12.0 1 1

Seq Scan on campaigns (cost=0.00..16.80 rows=12 width=8) (actual time=0.504..0.504 rows=1 loops=1)

  • Filter: (account_id = 631)
  • Rows Removed by Filter: 19
607. 4.252 7.180 ↑ 26.5 298 1

Materialize (cost=0.00..1,085.50 rows=7,900 width=4) (actual time=0.671..7.180 rows=298 loops=1)

608. 2.928 2.928 ↑ 26.5 298 1

Seq Scan on units (cost=0.00..1,046.00 rows=7,900 width=4) (actual time=0.588..2.928 rows=298 loops=1)

Planning time : 400.469 ms
Execution time : 8,615.919 ms