explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vNJz

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 6,623.289 ↑ 38,601.0 3 1

Unique (cost=360,076.25..360,944.78 rows=115,803 width=12) (actual time=6,623.284..6,623.289 rows=3 loops=1)

2. 0.000 6,623.284 ↑ 38,601.0 3 1

Sort (cost=360,076.25..360,365.76 rows=115,803 width=12) (actual time=6,623.283..6,623.284 rows=3 loops=1)

  • Sort Key: agent_event_2019_03_01.id, (unnest(array_remove(ARRAY[CASE WHEN (((agent_event_2019_03_01.text_data ~~* '%сучара%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуйня%'::text) OR (agent_event_2019_03_01.text_data ~~* '%блят%'::text) OR (agent_event_2019_03_01.text_data ~~* '%бляд%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидарас%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ипись %'::text) OR (agent_event_2019_03_01.text_data ~~* '%изъеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%еблан%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебеный%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебущий%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебанашка%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебырь%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуище%'::text) OR (agent_event_2019_03_01.text_data ~~* '%гребан%'::text) OR (agent_event_2019_03_01.text_data ~~* '%уебище%'::text) OR (agent_event_2019_03_01.text_data ~~* '%уебан%'::text) OR (agent_event_2019_03_01.text_data ~~* '%феееб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%6ляд%'::text) OR (agent_event_2019_03_01.text_data ~~* '%сцука%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебали%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пестато%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебало%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебли%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебанут%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебут%'::text) OR (agent_event_2019_03_01.text_data ~~* '%заебу%'::text) OR (agent_event_2019_03_01.text_data ~~* '%выебу%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуйло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%нехе%'::text) OR (agent_event_2019_03_01.text_data ~~* '%неху%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ниху%'::text) OR (agent_event_2019_03_01.text_data ~~* '%нихе%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ибанут%'::text) OR (agent_event_2019_03_01.text_data ~~* '%fuck%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хули %'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуля %'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуе%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуё%'::text) OR (agent_event_2019_03_01.text_data ~~* '%мудл%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хер %'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидар%'::text) OR (agent_event_2019_03_01.text_data ~~* '%наху%'::text) OR (agent_event_2019_03_01.text_data ~~* '%педер%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидер%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидир%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ёбну%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебну%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебыр%'::text) OR (agent_event_2019_03_01.text_data ~~* '%заеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%заёб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебен%'::text) OR (agent_event_2019_03_01.text_data ~~* '%блятc%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебли%'::text) OR (agent_event_2019_03_01.text_data ~~* '%аебли%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%заебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%переебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%отебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%отъебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%отьебло%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебеш%'::text) OR (agent_event_2019_03_01.text_data ~~* '%выеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%отъеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%отьеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%перееб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуйла%'::text) OR (agent_event_2019_03_01.text_data ~~* '%заеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хую%'::text) OR (agent_event_2019_03_01.text_data ~~* '%6ля%'::text) OR (agent_event_2019_03_01.text_data ~~* '%6ля%'::text) OR (agent_event_2019_03_01.text_data ~~* '%блЯ%'::text) OR (agent_event_2019_03_01.text_data ~~* '%бля%'::text) OR (agent_event_2019_03_01.text_data ~~* '%бля%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуило%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуюше%'::text) OR (agent_event_2019_03_01.text_data ~~* '%сука%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ъеб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ъёб%'::text) OR (agent_event_2019_03_01.text_data ~~* '%бляд%'::text) OR (agent_event_2019_03_01.text_data ~~* '%блябу%'::text) OR (agent_event_2019_03_01.text_data ~~* '%бля бу%'::text) OR (agent_event_2019_03_01.text_data ~~* '%залупа%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хера%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пизжен%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ёпта%'::text) OR (agent_event_2019_03_01.text_data ~~* '%епта%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пистапол%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пизда%'::text) OR (agent_event_2019_03_01.text_data ~~* '%залупить%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебать%'::text) OR (agent_event_2019_03_01.text_data ~~* '%мудо%'::text) OR (agent_event_2019_03_01.text_data ~~* '%манда %'::text) OR (agent_event_2019_03_01.text_data ~~* '%мандавошка%'::text) OR (agent_event_2019_03_01.text_data ~~* '%мокрощелка%'::text) OR (agent_event_2019_03_01.text_data ~~* '%муда%'::text) OR (agent_event_2019_03_01.text_data ~~* '%муде%'::text) OR (agent_event_2019_03_01.text_data ~~* '%муди%'::text) OR (agent_event_2019_03_01.text_data ~~* '%мудн%'::text) OR (agent_event_2019_03_01.text_data ~~* '%мудо%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пизд%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуе%'::text) OR (agent_event_2019_03_01.text_data ~~* '%похую%'::text) OR (agent_event_2019_03_01.text_data ~~* '%похуй%'::text) OR (agent_event_2019_03_01.text_data ~~* '%охуи%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ебля%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидорас%'::text) OR (agent_event_2019_03_01.text_data ~~* '%пидор%'::text) OR (agent_event_2019_03_01.text_data ~~* '%херн%'::text) OR (agent_event_2019_03_01.text_data ~~* '%щлюха%'::text) OR (agent_event_2019_03_01.text_data ~~* '%хуй%'::text) OR (agent_event_2019_03_01.text_data ~~* '%писдеш%'::text) OR (agent_event_2019_03_01.text_data ~~* '%писдит%'::text) OR (agent_event_2019_03_01.text_data ~~* '%писдиш%'::text) OR (agent_event_2019_03_01.text_data ~~* '%нехуй%'::text) OR (agent_event_2019_03_01.text_data ~~* '%ниибаца%'::text)) AND (agent_eventtype.id = '1'::bigint)) THEN 87 ELSE 0 END], 0)))
  • Sort Method: quicksort Memory: 25kB
3. 46.427 6,627.506 ↑ 38,601.0 3 1

Gather (cost=1,969.41..348,355.46 rows=115,803 width=12) (actual time=2,092.487..6,627.506 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 6,472.905 6,581.079 ↑ 4,825,100.0 1 3

ProjectSet (cost=969.41..335,775.16 rows=4,825,100 width=12) (actual time=3,583.267..6,581.079 rows=1 loops=3)

5. 18.367 108.174 ↑ 1.2 41,197 3

Hash Left Join (cost=969.41..297,053.73 rows=48,251 width=147) (actual time=15.862..108.174 rows=41,197 loops=3)

  • Hash Cond: (agent_event_2019_03_01.id = agent_contact_events.event_id)
6. 19.653 87.059 ↑ 1.2 41,167 3

Hash Left Join (cost=582.02..296,200.38 rows=48,251 width=147) (actual time=13.065..87.059 rows=41,167 loops=3)

  • Hash Cond: (agent_event_2019_03_01.id = analytics_filter_events.event_id)
7. 15.121 56.997 ↑ 1.2 41,167 3

Hash Left Join (cost=2.08..295,353.03 rows=48,251 width=147) (actual time=2.561..56.997 rows=41,167 loops=3)

  • Hash Cond: (agent_event_2019_03_01.event_type_id = agent_eventtype.id)
8. 0.000 41.846 ↑ 1.2 41,167 3

Parallel Append (cost=0.43..295,206.19 rows=48,257 width=251) (actual time=2.457..41.846 rows=41,167 loops=3)

9. 22.913 29.128 ↑ 1.1 30,722 3

Parallel Bitmap Heap Scan on agent_event_2019_03_01 (cost=3,206.80..293,097.66 rows=35,218 width=286) (actual time=2.470..29.128 rows=30,722 loops=3)

  • Recheck Cond: ((id > 26412) AND (id <= 150000))
  • Heap Blocks: exact=2077
10. 6.215 6.215 ↓ 1.1 92,167 1

Bitmap Index Scan on agent_event_2019_03_01_c55bf703 (cost=0.00..3,185.66 rows=84,523 width=0) (actual time=6.215..6.215 rows=92,167 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
11. 0.035 0.035 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2019_04_01_e7d23fce on agent_event_2019_04_01 (cost=0.43..8.44 rows=1 width=261) (actual time=0.035..0.035 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
12. 0.004 0.004 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_05_01_955e72cd on agent_event_2018_05_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
13. 0.007 0.007 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_06_01_75ab2ceb on agent_event_2018_06_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
14. 0.004 0.004 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_08_01_594c1cef on agent_event_2018_08_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
15. 0.005 0.005 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_10_01_9b6e5968 on agent_event_2018_10_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
16. 0.004 0.004 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_11_01_b1faba8e on agent_event_2018_11_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
17. 0.001 0.001 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2019_05_01_fd5fee9a on agent_event_2019_05_01 (cost=0.14..8.16 rows=1 width=152) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
18. 0.001 0.001 ↓ 0.0 0 1

Parallel Index Scan using agent_event_default_a189e9b6 on agent_event_default (cost=0.14..8.16 rows=1 width=152) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: ((id > 26412) AND (id <= 150000))
19. 7.797 7.797 ↑ 1.2 10,322 2

Parallel Seq Scan on agent_event_2019_02_01 (cost=0.00..1,145.68 rows=12,124 width=156) (actual time=0.015..7.797 rows=10,322 loops=2)

  • Filter: ((id > 26412) AND (id <= 150000))
  • Rows Removed by Filter: 87
20. 7.131 7.131 ↓ 1.7 10,672 1

Parallel Seq Scan on agent_event_2019_01_01 (cost=0.00..651.81 rows=6,260 width=156) (actual time=0.009..7.131 rows=10,672 loops=1)

  • Filter: ((id > 26412) AND (id <= 150000))
  • Rows Removed by Filter: 187
21. 0.017 0.017 ↓ 1.7 17 1

Parallel Seq Scan on agent_event_2018_09_01 (cost=0.00..2.15 rows=10 width=206) (actual time=0.005..0.017 rows=17 loops=1)

  • Filter: ((id > 26412) AND (id <= 150000))
22. 0.004 0.004 ↑ 1.0 1 1

Parallel Seq Scan on agent_event_2018_04_01 (cost=0.00..1.02 rows=1 width=140) (actual time=0.002..0.004 rows=1 loops=1)

  • Filter: ((id > 26412) AND (id <= 150000))
  • Rows Removed by Filter: 1
23. 0.005 0.005 ↓ 0.0 0 1

Parallel Seq Scan on agent_event_2018_07_01 (cost=0.00..1.01 rows=1 width=122) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((id > 26412) AND (id <= 150000))
  • Rows Removed by Filter: 1
24. 0.008 0.030 ↑ 1.0 29 3

Hash (cost=1.29..1.29 rows=29 width=8) (actual time=0.030..0.030 rows=29 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
25. 0.022 0.022 ↑ 1.0 29 3

Seq Scan on agent_eventtype (cost=0.00..1.29 rows=29 width=8) (actual time=0.019..0.022 rows=29 loops=3)

26. 2.777 10.409 ↑ 1.0 20,753 3

Hash (cost=320.53..320.53 rows=20,753 width=8) (actual time=10.408..10.409 rows=20,753 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 1067kB
27. 7.632 7.632 ↑ 1.0 20,753 3

Seq Scan on analytics_filter_events (cost=0.00..320.53 rows=20,753 width=8) (actual time=0.009..7.632 rows=20,753 loops=3)

28. 1.385 2.748 ↑ 1.0 10,506 3

Hash (cost=256.06..256.06 rows=10,506 width=12) (actual time=2.748..2.748 rows=10,506 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 621kB
29. 1.363 1.363 ↑ 1.0 10,506 3

Seq Scan on agent_contact_events (cost=0.00..256.06 rows=10,506 width=12) (actual time=0.015..1.363 rows=10,506 loops=3)