explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1D8S

Settings
# exclusive inclusive rows x rows loops node
1. 23.836 111.930 ↓ 0.0 11,044 1

Custom Scan (Citus Router) (cost=0.00..0.00 rows=0 width=0) (actual time=111.329..111.930 rows=11,044 loops=1)

  • Task Count: 1
  • Tasks Shown: All
  • -> Task
  • Node: host=citus_primary1 port=5432 dbname=aa_citus_db
2. 19.253 88.094 ↓ 55.2 11,044 1

WindowAgg (cost=1,941,329.04..1,941,367.33 rows=200 width=144) (actual time=72.303..88.094 rows=11,044 loops=1)

3. 9.973 68.841 ↓ 55.2 11,044 1

Finalize GroupAggregate (cost=1,941,329.04..1,941,357.83 rows=200 width=104) (actual time=55.233..68.841 rows=11,044 loops=1)

  • Group Key: (unnest(advancedreview_term_fact_v2_9.term_ids))
4. 0.000 58.868 ↓ 16.0 12,832 1

Gather Merge (cost=1,941,329.04..1,941,340.83 rows=800 width=128) (actual time=55.220..58.868 rows=12,832 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
5. 6.960 233.090 ↓ 12.8 2,566 5

Sort (cost=1,941,328.99..1,941,329.49 rows=200 width=128) (actual time=46.261..46.618 rows=2,566 loops=5)

  • Sort Key: (unnest(advancedreview_term_fact_v2_9.term_ids))
  • Sort Method: quicksort Memory: 1573kB
  • Worker 0: Sort Method: quicksort Memory: 1301kB
  • Worker 1: Sort Method: quicksort Memory: 1015kB
  • Worker 2: Sort Method: quicksort Memory: 25kB
  • Worker 3: Sort Method: quicksort Memory: 26kB
6. 15.860 226.130 ↓ 12.8 2,566 5

Partial HashAggregate (cost=1,941,319.34..1,941,321.34 rows=200 width=128) (actual time=44.147..45.226 rows=2,566 loops=5)

  • Group Key: unnest(advancedreview_term_fact_v2_9.term_ids)
7. 8.565 210.270 ↑ 79,297.9 3,755 5

ProjectSet (cost=3,312.74..1,584,002.84 rows=297,763,800 width=63) (actual time=27.667..42.054 rows=3,755 loops=5)

8. 5.620 201.705 ↑ 2,416.9 1,232 5

Parallel Hash Join (cost=3,312.74..50,519.27 rows=2,977,638 width=213) (actual time=27.662..40.341 rows=1,232 loops=5)

  • Hash Cond: (advancedreview_term_fact_v2_9.review_id = advancedreview_topic_fact_v2_4.review_id)
9. 1.850 114.920 ↑ 7.0 4,963 5

Parallel Append (cost=0.00..13,490.34 rows=34,691 width=222) (actual time=0.893..22.984 rows=4,963 loops=5)

10. 21.479 21.479 ↑ 1.9 2,521 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201910_182896 advancedreview_term_fact_v2_9 (cost=0.00..1,816.73 rows=4,810 width=216) (actual time=0.168..21.479 rows=2,521 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 18830
11. 13.230 13.230 ↑ 3.0 3,660 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201901_182384 advancedreview_term_fact_v2 (cost=0.00..1,493.08 rows=11,137 width=224) (actual time=0.596..13.230 rows=3,660 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 9298
12. 14.766 14.766 ↑ 3.6 3,461 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201905_181872 advancedreview_term_fact_v2_4 (cost=0.00..1,477.80 rows=12,560 width=220) (actual time=2.312..14.766 rows=3,461 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 9418
13. 13.052 13.052 ↑ 3.6 3,369 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201907_182128 advancedreview_term_fact_v2_6 (cost=0.00..1,452.14 rows=12,202 width=215) (actual time=1.089..13.052 rows=3,369 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 9348
14. 12.702 12.702 ↑ 5.6 1,074 2

Parallel Seq Scan on advancedreview_term_fact_v2_p_201906_183024 advancedreview_term_fact_v2_5 (cost=0.00..1,333.47 rows=5,976 width=220) (actual time=1.067..6.351 rows=1,074 loops=2)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 4750
15. 12.680 12.680 ↑ 19.1 416 5

Parallel Seq Scan on advancedreview_term_fact_v2_p_201904_181616 advancedreview_term_fact_v2_3 (cost=0.00..1,289.70 rows=7,950 width=225) (actual time=0.044..2.536 rows=416 loops=5)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 1829
16. 12.858 12.858 ↑ 7.8 604 3

Parallel Seq Scan on advancedreview_term_fact_v2_p_201903_182640 advancedreview_term_fact_v2_2 (cost=0.00..1,231.80 rows=4,712 width=219) (actual time=0.746..4.286 rows=604 loops=3)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 2987
17. 5.018 5.018 ↑ 3.6 1,963 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201908_181744 advancedreview_term_fact_v2_7 (cost=0.00..1,127.60 rows=7,103 width=230) (actual time=0.136..5.018 rows=1,963 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 7838
18. 3.641 3.641 ↑ 3.4 1,990 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201902_182000 advancedreview_term_fact_v2_1 (cost=0.00..1,054.83 rows=6,753 width=228) (actual time=0.139..3.641 rows=1,990 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 7182
19. 3.644 3.644 ↑ 3.5 1,815 1

Parallel Seq Scan on advancedreview_term_fact_v2_p_201909_182768 advancedreview_term_fact_v2_8 (cost=0.00..1,039.74 rows=6,439 width=226) (actual time=0.297..3.644 rows=1,815 loops=1)

  • Filter: ((date >= '2019-01-01'::date) AND (date <= '2019-10-31'::date) AND (product_id = 284882215) AND (country_code = 'US'::bpchar) AND (rating = ANY ('{1,2,3,4,5}'::integer[])))
  • Rows Removed by Filter: 7230
20. 2.565 81.165 ↑ 3.1 1,775 5

Parallel Hash (cost=3,243.52..3,243.52 rows=5,538 width=19) (actual time=16.233..16.233 rows=1,775 loops=5)

  • Buckets: 32768 Batches: 1 Memory Usage: 800kB
21. 0.645 78.600 ↑ 3.1 1,775 5

Parallel Append (cost=285.58..3,243.52 rows=5,538 width=19) (actual time=8.774..15.720 rows=1,775 loops=5)

22. 29.249 40.355 ↑ 3.9 331 5

Parallel Bitmap Heap Scan on advancedreview_topic_fact_v2_p_201910_183952 advancedreview_topic_fact_v2_4 (cost=654.59..1,009.10 rows=1,277 width=19) (actual time=7.148..8.071 rows=331 loops=5)

  • Recheck Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
  • Filter: (product_id = 284882215)
  • Rows Removed by Filter: 266
  • Heap Blocks: exact=730
23. 11.106 11.106 ↓ 1.2 14,999 1

Bitmap Index Scan on advancedreview_topic_fact_v2__review_id_product_2526e335_183952 (cost=0.00..654.04 rows=12,494 width=0) (actual time=11.106..11.106 rows=14,999 loops=1)

  • Index Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
24. 9.410 16.818 ↑ 4.6 967 3

Parallel Bitmap Heap Scan on advancedreview_topic_fact_v2_p_201907_184080 advancedreview_topic_fact_v2_1 (cost=418.06..778.76 rows=4,425 width=19) (actual time=4.478..5.606 rows=967 loops=3)

  • Recheck Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
  • Filter: (product_id = 284882215)
  • Rows Removed by Filter: 440
  • Heap Blocks: exact=659
25. 7.408 7.408 ↓ 1.0 21,339 1

Bitmap Index Scan on advancedreview_topic_fact_v2__review_id_product_d3c9e147_184080 (cost=0.00..416.18 rows=21,158 width=0) (actual time=7.408..7.408 rows=21,339 loops=1)

  • Index Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
26. 10.042 14.854 ↑ 2.9 670 2

Parallel Bitmap Heap Scan on advancedreview_topic_fact_v2_p_201908_183568 advancedreview_topic_fact_v2_2 (cost=285.58..512.73 rows=1,932 width=19) (actual time=5.973..7.427 rows=670 loops=2)

  • Recheck Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
  • Filter: (product_id = 284882215)
  • Rows Removed by Filter: 498
  • Heap Blocks: exact=794
27. 4.812 4.812 ↓ 1.0 11,670 1

Bitmap Index Scan on advancedreview_topic_fact_v2__review_id_product_f0f95f8c_183568 (cost=0.00..284.76 rows=11,536 width=0) (actual time=4.811..4.812 rows=11,670 loops=1)

  • Index Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
28. 0.900 1.644 ↓ 2.8 1,818 1

Parallel Bitmap Heap Scan on advancedreview_topic_fact_v2_p_201911_183696 advancedreview_topic_fact_v2_5 (cost=36.40..111.30 rows=650 width=19) (actual time=0.940..1.644 rows=1,818 loops=1)

  • Recheck Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
  • Filter: (product_id = 284882215)
  • Rows Removed by Filter: 1079
  • Heap Blocks: exact=201
29. 0.744 0.744 ↓ 1.0 2,997 1

Bitmap Index Scan on advancedreview_topic_fact_v2__review_id_product_0674fe8c_183696 (cost=0.00..36.13 rows=2,953 width=0) (actual time=0.743..0.744 rows=2,997 loops=1)

  • Index Cond: ((country_code = 'US'::bpchar) AND (topic_ids @> '{4}'::smallint[]))
30. 4.081 4.081 ↑ 1.6 1,159 1

Parallel Seq Scan on advancedreview_topic_fact_v2_p_201909_183440 advancedreview_topic_fact_v2_3 (cost=0.00..767.88 rows=1,812 width=19) (actual time=0.207..4.081 rows=1,159 loops=1)

  • Filter: ((topic_ids @> '{4}'::smallint[]) AND (product_id = 284882215) AND (country_code = 'US'::bpchar))
  • Rows Removed by Filter: 12076
31. 0.203 0.203 ↓ 1.3 4 1

Parallel Seq Scan on advancedreview_topic_fact_v2_p_201906_183824 advancedreview_topic_fact_v2 (cost=0.00..36.05 rows=3 width=19) (actual time=0.058..0.203 rows=4 loops=1)

  • Filter: ((topic_ids @> '{4}'::smallint[]) AND (product_id = 284882215) AND (country_code = 'US'::bpchar))
  • Rows Removed by Filter: 490