explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f2bq : unsynced domains

Settings
# exclusive inclusive rows x rows loops node
1. 0.033 1.153 ↑ 1.0 1 1

Aggregate (cost=17,639.70..17,639.71 rows=1 width=8) (actual time=1.136..1.153 rows=1 loops=1)

2.          

CTE result_dates

3. 0.049 1.049 ↓ 0.0 0 1

HashAggregate (cost=3,161.80..3,266.51 rows=10,471 width=16) (actual time=1.042..1.049 rows=0 loops=1)

  • Group Key: multisample_results_2019_12.domain_id, multisample_results_2019_12.keyword_id, m.parent_id
4. 0.014 1.000 ↓ 0.0 0 1

Hash Join (cost=2,195.47..3,057.09 rows=10,471 width=16) (actual time=0.992..1.000 rows=0 loops=1)

  • Hash Cond: (multisample_results_2019_12.market_id = m.market_id)
5. 0.047 0.986 ↓ 0.0 0 1

Append (cost=6.35..840.48 rows=10,471 width=16) (actual time=0.977..0.986 rows=0 loops=1)

  • Subplans Removed: 12
6. 0.017 0.039 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2019_12 (cost=6.35..21.30 rows=283 width=16) (actual time=0.032..0.039 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
7. 0.022 0.022 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2019_12_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.014..0.022 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
8. 0.019 0.042 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_01 (cost=6.35..21.30 rows=283 width=16) (actual time=0.035..0.042 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
9. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_01_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.015..0.023 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
10. 0.015 0.033 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_02 (cost=6.35..21.30 rows=283 width=16) (actual time=0.027..0.033 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
11. 0.018 0.018 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_02_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.011..0.018 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
12. 0.029 0.044 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_03 (cost=6.35..21.30 rows=283 width=16) (actual time=0.037..0.044 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
13. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_03_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.008..0.015 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
14. 0.014 0.032 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_04 (cost=6.35..21.30 rows=283 width=16) (actual time=0.025..0.032 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
15. 0.018 0.018 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_04_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.018 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
16. 0.014 0.031 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_05 (cost=6.35..21.30 rows=283 width=16) (actual time=0.024..0.031 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
17. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_05_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
18. 0.015 0.035 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_06 (cost=6.35..21.30 rows=283 width=16) (actual time=0.027..0.035 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
19. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_06_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.012..0.020 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
20. 0.015 0.032 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_07 (cost=6.35..21.30 rows=283 width=16) (actual time=0.026..0.032 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
21. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_07_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.008..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
22. 0.015 0.029 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_08 (cost=6.35..21.30 rows=283 width=16) (actual time=0.022..0.029 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
23. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_08_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.007..0.014 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
24. 0.014 0.031 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_09 (cost=6.35..21.30 rows=283 width=16) (actual time=0.024..0.031 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
25. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_09_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
26. 0.017 0.034 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_10 (cost=6.35..21.30 rows=283 width=16) (actual time=0.025..0.034 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
27. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_10_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
28. 0.016 0.035 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_11 (cost=6.35..21.30 rows=283 width=16) (actual time=0.026..0.035 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
29. 0.019 0.019 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_11_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.012..0.019 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
30. 0.005 0.035 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2020_12 (cost=6.35..21.30 rows=283 width=16) (actual time=0.028..0.035 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
31. 0.030 0.030 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2020_12_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.030 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
32. 0.016 0.034 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_01 (cost=6.35..21.30 rows=283 width=16) (actual time=0.027..0.034 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
33. 0.018 0.018 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_01_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.011..0.018 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
34. 0.029 0.044 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_02 (cost=6.35..21.30 rows=283 width=16) (actual time=0.037..0.044 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
35. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_02_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.009..0.015 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
36. 0.014 0.031 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_03 (cost=6.35..21.30 rows=283 width=16) (actual time=0.025..0.031 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
37. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_03_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
38. 0.016 0.033 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_04 (cost=6.35..21.30 rows=283 width=16) (actual time=0.025..0.033 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
39. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_04_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.010..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
40. 0.013 0.034 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_05 (cost=6.35..21.30 rows=283 width=16) (actual time=0.027..0.034 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
41. 0.021 0.021 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_05_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.012..0.021 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
42. 0.019 0.033 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_06 (cost=6.35..21.30 rows=283 width=16) (actual time=0.026..0.033 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
43. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_06_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.008..0.014 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
44. 0.014 0.029 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_07 (cost=6.35..21.30 rows=283 width=16) (actual time=0.022..0.029 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
45. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_07_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.007..0.015 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
46. 0.016 0.035 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_08 (cost=6.35..21.30 rows=283 width=16) (actual time=0.026..0.035 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
47. 0.019 0.019 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_08_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.011..0.019 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
48. 0.014 0.029 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_09 (cost=6.35..21.30 rows=283 width=16) (actual time=0.022..0.029 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
49. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_09_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.008..0.015 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
50. 0.014 0.032 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_10 (cost=6.35..21.30 rows=283 width=16) (actual time=0.025..0.032 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
51. 0.018 0.018 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_10_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.011..0.018 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
52. 0.016 0.113 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_11 (cost=6.35..21.30 rows=283 width=16) (actual time=0.106..0.113 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
53. 0.097 0.097 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_11_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.090..0.097 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
54. 0.000 0.040 ↓ 0.0 0 1

Bitmap Heap Scan on multisample_results_2021_12 (cost=6.35..21.30 rows=283 width=16) (actual time=0.032..0.040 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
55. 0.108 0.108 ↓ 0.0 0 1

Bitmap Index Scan on multisample_results_2021_12_created_date_idx (cost=0.00..6.28 rows=283 width=0) (actual time=0.015..0.108 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
56. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,421.83..1,421.83 rows=61,383 width=8) (never executed)

57. 0.000 0.000 ↓ 0.0 0

Seq Scan on markets m (cost=0.00..1,421.83 rows=61,383 width=8) (never executed)

58.          

CTE ranking_dates

59. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=13,221.48..13,251.31 rows=1,326 width=16) (never executed)

  • Group Key: d.domain_id, dk.keyword_id, dm.market_id
60. 0.000 0.000 ↓ 0.0 0

Sort (cost=13,221.48..13,224.79 rows=1,326 width=16) (never executed)

  • Sort Key: d.domain_id, dk.keyword_id, dm.market_id
61. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2,245.48..13,152.71 rows=1,326 width=16) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2,245.33..2,289.45 rows=1,326 width=12) (never executed)

  • Hash Cond: (dm.domain_id = d.domain_id)
63. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2,189.12..2,216.20 rows=755 width=8) (never executed)

  • Hash Cond: (dm.market_id = m_1.market_id)
64. 0.000 0.000 ↓ 0.0 0

Seq Scan on domains_markets dm (cost=0.00..25.10 rows=755 width=8) (never executed)

  • Filter: (NOT deleted)
65. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,421.83..1,421.83 rows=61,383 width=4) (never executed)

66. 0.000 0.000 ↓ 0.0 0

Seq Scan on markets m_1 (cost=0.00..1,421.83 rows=61,383 width=4) (never executed)

  • Filter: (parent_id IS NULL)
67. 0.000 0.000 ↓ 0.0 0

Hash (cost=46.78..46.78 rows=755 width=12) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=19.68..46.78 rows=755 width=12) (never executed)

  • Hash Cond: (dk.domain_id = d.domain_id)
69. 0.000 0.000 ↓ 0.0 0

Seq Scan on domains_keywords dk (cost=0.00..25.10 rows=755 width=8) (never executed)

  • Filter: (NOT deleted)
70. 0.000 0.000 ↓ 0.0 0

Hash (cost=14.30..14.30 rows=430 width=4) (never executed)

71. 0.000 0.000 ↓ 0.0 0

Seq Scan on domains d (cost=0.00..14.30 rows=430 width=4) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.15..8.17 rows=1 width=4) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Index Only Scan Backward using multisample_rankings_pkey on multisample_rankings (cost=0.15..8.17 rows=1 width=4) (never executed)

  • Index Cond: ((domain_id = d.domain_id) AND (keyword_id = dk.keyword_id) AND (market_id = dm.market_id))
  • Heap Fetches: 0
74.          

CTE unsynced_mtks

75. 0.019 1.103 ↓ 0.0 0 1

Merge Join (cost=1,003.87..1,121.86 rows=1 width=20) (actual time=1.096..1.103 rows=0 loops=1)

  • Merge Cond: ((result_dates.domain_id = ranking_dates.domain_id) AND (result_dates.keyword_id = ranking_dates.keyword_id) AND (result_dates.market_id = ranking_dates.market_id))
  • Join Filter: (result_dates.result_date > ranking_dates.ranking_date)
76. 0.019 1.084 ↓ 0.0 0 1

Sort (cost=908.57..934.75 rows=10,471 width=16) (actual time=1.077..1.084 rows=0 loops=1)

  • Sort Key: result_dates.domain_id, result_dates.keyword_id, result_dates.market_id
  • Sort Method: quicksort Memory: 25kB
77. 1.065 1.065 ↓ 0.0 0 1

CTE Scan on result_dates (cost=0.00..209.42 rows=10,471 width=16) (actual time=1.057..1.065 rows=0 loops=1)

78. 0.000 0.000 ↓ 0.0 0

Sort (cost=95.29..98.61 rows=1,326 width=16) (never executed)

  • Sort Key: ranking_dates.domain_id, ranking_dates.keyword_id, ranking_dates.market_id
79. 0.000 0.000 ↓ 0.0 0

CTE Scan on ranking_dates (cost=0.00..26.52 rows=1,326 width=16) (never executed)

80. 1.120 1.120 ↓ 0.0 0 1

CTE Scan on unsynced_mtks (cost=0.00..0.02 rows=1 width=4) (actual time=1.113..1.120 rows=0 loops=1)