explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8W3z : unsynced domains RO

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 1.001 ↑ 1.0 1 1

Aggregate (cost=17,453.76..17,453.77 rows=1 width=8) (actual time=0.988..1.001 rows=1 loops=1)

2.          

CTE result_dates

3. 0.044 0.906 ↓ 0.0 0 1

HashAggregate (cost=3,068.82..3,173.53 rows=10,471 width=16) (actual time=0.900..0.906 rows=0 loops=1)

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

Hash Join (cost=2,102.49..2,964.11 rows=10,471 width=16) (actual time=0.856..0.862 rows=0 loops=1)

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

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

  • Subplans Removed: 12
6. 0.020 0.037 ↓ 0.0 0 1

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
7. 0.017 0.017 ↓ 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.011..0.017 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2020_01 (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))
9. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2020_02 (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))
11. 0.016 0.016 ↓ 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.010..0.016 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
13. 0.016 0.016 ↓ 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.009..0.016 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
15. 0.022 0.022 ↓ 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.009..0.022 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
17. 0.016 0.016 ↓ 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.009..0.016 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2020_06 (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))
19. 0.019 0.019 ↓ 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.019 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
21. 0.075 0.075 ↓ 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.069..0.075 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
23. 0.017 0.017 ↓ 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.011..0.017 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
24. 0.016 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.025..0.031 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
25. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
27. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2020_11 (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))
29. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
31. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_01 (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))
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.012..0.018 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_02 (cost=6.35..21.30 rows=283 width=16) (actual time=0.022..0.028 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.013 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.018 0.018 ↓ 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.012..0.018 rows=0 loops=1)

  • Index Cond: (created_date > (now() - '90 days'::interval))
38. 0.016 0.031 ↓ 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.031 rows=0 loops=1)

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
39. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_05 (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))
41. 0.016 0.016 ↓ 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.010..0.016 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_06 (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))
43. 0.018 0.018 ↓ 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.012..0.018 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_08 (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))
47. 0.018 0.018 ↓ 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.012..0.018 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_09 (cost=6.35..21.30 rows=283 width=16) (actual time=0.032..0.038 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.009..0.015 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
51. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Bitmap Heap Scan on multisample_results_2021_11 (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))
53. 0.016 0.016 ↓ 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.010..0.016 rows=0 loops=1)

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

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

  • Recheck Cond: (created_date > (now() - '90 days'::interval))
55. 0.015 0.015 ↓ 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.009..0.015 rows=0 loops=1)

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

Hash (cost=1,361.62..1,361.62 rows=58,762 width=8) (never executed)

57. 0.000 0.000 ↓ 0.0 0

Seq Scan on markets m (cost=0.00..1,361.62 rows=58,762 width=8) (never executed)

58.          

CTE ranking_dates

59. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=13,128.51..13,158.34 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,128.51..13,131.82 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,152.51..13,059.73 rows=1,326 width=16) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2,152.36..2,196.48 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,096.14..2,123.23 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,361.62..1,361.62 rows=58,762 width=4) (never executed)

66. 0.000 0.000 ↓ 0.0 0

Seq Scan on markets m_1 (cost=0.00..1,361.62 rows=58,762 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.014 0.957 ↓ 0.0 0 1

Merge Join (cost=1,003.87..1,121.86 rows=1 width=20) (actual time=0.950..0.957 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.024 0.943 ↓ 0.0 0 1

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

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

CTE Scan on result_dates (cost=0.00..209.42 rows=10,471 width=16) (actual time=0.913..0.919 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. 0.970 0.970 ↓ 0.0 0 1

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

Planning time : 15.945 ms
Execution time : 3.225 ms