explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mxxr

Settings
# exclusive inclusive rows x rows loops node
1. 1.789 27,538.799 ↓ 0.0 0 1

Insert on analytics_filter_events (cost=49,863.00..1,986,142.29 rows=63,088 width=20) (actual time=27,538.799..27,538.799 rows=0 loops=1)

2. 719.230 27,537.010 ↑ 4,506.3 14 1

Hash Anti Join (cost=49,863.00..1,986,142.29 rows=63,088 width=20) (actual time=27,239.132..27,537.010 rows=14 loops=1)

  • Hash Cond: (agent_event_1600_01_01.id = analytics_filter_events_1.event_id)
3. 175.105 26,394.675 ↑ 1.0 1,446,070 1

Append (cost=0.00..1,912,810.95 rows=1,453,791 width=8) (actual time=10.634..26,394.675 rows=1,446,070 loops=1)

4. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on agent_event_1600_01_01 (cost=0.00..1.09 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 6
5. 0.003 0.003 ↓ 0.0 0 1

Index Scan using agent_event_2017_10_01_96c6549d on agent_event_2017_10_01 (cost=0.14..8.16 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (id > 0)
6. 273.488 283.944 ↓ 1.0 19,146 1

Bitmap Heap Scan on agent_event_2017_11_01 (cost=419.74..7,311.87 rows=19,009 width=8) (actual time=10.625..283.944 rows=19,146 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=1745
7. 10.456 10.456 ↓ 1.0 19,146 1

Bitmap Index Scan on agent_event_2017_11_01_c6c4f80b (cost=0.00..414.99 rows=19,009 width=0) (actual time=10.456..10.456 rows=19,146 loops=1)

  • Index Cond: (event_type_id = 100500)
8. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on agent_event_2017_12_01 (cost=0.00..1.01 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1
9. 2,662.782 2,662.782 ↑ 1.0 125,167 1

Index Scan using agent_event_2018_01_01_07ec087f on agent_event_2018_01_01 (cost=0.43..180,481.56 rows=125,958 width=8) (actual time=0.930..2,662.782 rows=125,167 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (id > 0)
10. 848.088 895.164 ↑ 1.0 104,240 1

Bitmap Heap Scan on agent_event_2018_02_01 (cost=2,470.71..73,172.27 rows=108,681 width=8) (actual time=48.265..895.164 rows=104,240 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=7580
11. 47.076 47.076 ↑ 1.0 104,240 1

Bitmap Index Scan on agent_event_2018_02_01_f9766e82 (cost=0.00..2,443.53 rows=108,681 width=0) (actual time=47.076..47.076 rows=104,240 loops=1)

  • Index Cond: (event_type_id = 100500)
12. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on agent_event_2018_03_01 (cost=0.00..1.01 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1
13. 1,492.717 1,533.010 ↑ 1.0 118,250 1

Bitmap Heap Scan on agent_event_2018_04_01 (cost=2,694.11..28,979.77 rows=119,444 width=8) (actual time=42.106..1,533.010 rows=118,250 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=11053
14. 40.293 40.293 ↑ 1.0 118,250 1

Bitmap Index Scan on agent_event_2018_04_01_89c73e64 (cost=0.00..2,664.25 rows=119,444 width=0) (actual time=40.293..40.293 rows=118,250 loops=1)

  • Index Cond: (event_type_id = 100500)
15. 2,924.349 2,924.349 ↓ 1.0 279,045 1

Seq Scan on agent_event_2018_05_01 (cost=0.00..158,297.93 rows=275,836 width=8) (actual time=0.508..2,924.349 rows=279,045 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1724463
16. 3,146.602 3,251.713 ↓ 1.0 261,196 1

Bitmap Heap Scan on agent_event_2018_06_01 (cost=6,136.08..686,538.70 rows=250,793 width=8) (actual time=108.822..3,251.713 rows=261,196 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=25938
17. 105.111 105.111 ↓ 1.0 261,385 1

Bitmap Index Scan on agent_event_2018_06_01_d9d6a3fd (cost=0.00..6,073.38 rows=250,793 width=0) (actual time=105.111..105.111 rows=261,385 loops=1)

  • Index Cond: (event_type_id = 100500)
18. 21.722 21.722 ↑ 1.0 13,909 1

Seq Scan on agent_event_2018_07_01 (cost=0.00..1,888.49 rows=13,909 width=8) (actual time=0.027..21.722 rows=13,909 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 16057
19. 2,190.407 2,195.149 ↓ 1.0 57,048 1

Bitmap Heap Scan on agent_event_2018_08_01 (cost=1,151.49..39,784.99 rows=56,138 width=8) (actual time=6.610..2,195.149 rows=57,048 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=13132
20. 4.742 4.742 ↓ 1.0 57,195 1

Bitmap Index Scan on agent_event_2018_08_01_dcde175f (cost=0.00..1,137.46 rows=56,138 width=0) (actual time=4.742..4.742 rows=57,195 loops=1)

  • Index Cond: (event_type_id = 100500)
21. 4,681.537 4,698.712 ↑ 1.0 41,397 1

Bitmap Heap Scan on agent_event_2018_09_01 (cost=890.01..88,103.27 rows=42,011 width=8) (actual time=20.601..4,698.712 rows=41,397 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=23761
22. 17.175 17.175 ↑ 1.0 41,397 1

Bitmap Index Scan on agent_event_2018_09_01_23abcbc5 (cost=0.00..879.51 rows=42,011 width=0) (actual time=17.175..17.175 rows=41,397 loops=1)

  • Index Cond: (event_type_id = 100500)
23. 1,041.756 1,041.756 ↑ 1.0 79,088 1

Index Scan using agent_event_2018_10_01_54b94712 on agent_event_2018_10_01 (cost=0.43..168,527.41 rows=79,433 width=8) (actual time=0.036..1,041.756 rows=79,088 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (id > 0)
24. 6,640.543 6,640.543 ↑ 1.0 322,964 1

Seq Scan on agent_event_2018_11_01 (cost=0.00..434,751.57 rows=338,098 width=8) (actual time=0.515..6,640.543 rows=322,964 loops=1)

  • Filter: ((id > 0) AND (event_type_id = 100500))
  • Rows Removed by Filter: 4210066
25. 47.663 70.688 ↓ 1.0 24,620 1

Bitmap Heap Scan on agent_event_2018_12_01 (cost=542.11..37,684.70 rows=24,476 width=8) (actual time=24.507..70.688 rows=24,620 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (id > 0)
  • Heap Blocks: exact=12067
26. 23.025 23.025 ↓ 1.0 24,623 1

Bitmap Index Scan on agent_event_2018_12_01_c6650f2a (cost=0.00..535.99 rows=24,476 width=0) (actual time=23.025..23.025 rows=24,623 loops=1)

  • Index Cond: (event_type_id = 100500)
27. 0.014 0.014 ↓ 0.0 0 1

Index Scan using agent_event_2019_01_01_56f3ca8f on agent_event_2019_01_01 (cost=0.14..8.16 rows=1 width=8) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (id > 0)
28. 225.144 423.105 ↑ 1.0 1,520,705 1

Hash (cost=24,913.11..24,913.11 rows=1,520,711 width=8) (actual time=423.104..423.105 rows=1,520,705 loops=1)

  • Buckets: 131072 Batches: 32 Memory Usage: 2877kB
29. 197.961 197.961 ↑ 1.0 1,520,705 1

Seq Scan on analytics_filter_events analytics_filter_events_1 (cost=0.00..24,913.11 rows=1,520,711 width=8) (actual time=0.010..197.961 rows=1,520,705 loops=1)