explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uEJT

Settings
# exclusive inclusive rows x rows loops node
1. 19.863 23,384.172 ↓ 2.5 117,334 1

Subquery Scan on analytics_session_view (cost=2,868,046.98..2,928,658.35 rows=47,260 width=148) (actual time=22,528.617..23,384.172 rows=117,334 loops=1)

2. 667.865 23,364.309 ↓ 2.5 117,334 1

GroupAggregate (cost=2,868,046.98..2,928,185.75 rows=47,260 width=156) (actual time=22,528.616..23,364.309 rows=117,334 loops=1)

  • Group Key: sessions.global_session_id, sessions.agent_id, sessions.account_id, sessions.application_id, sessions.web_data_id
  • Filter: (min(sessions.id) > '10000000000000'::bigint)
  • Rows Removed by Filter: 315260
3. 957.708 22,696.444 ↑ 1.0 1,409,807 1

Sort (cost=2,868,046.98..2,871,591.50 rows=1,417,810 width=84) (actual time=22,457.836..22,696.444 rows=1,409,807 loops=1)

  • Sort Key: sessions.global_session_id, sessions.agent_id, sessions.account_id, sessions.application_id, sessions.web_data_id
  • Sort Method: external merge Disk: 129872kB
4. 215.593 21,738.736 ↑ 1.0 1,409,807 1

Subquery Scan on sessions (cost=2,520,139.62..2,587,485.59 rows=1,417,810 width=84) (actual time=19,796.428..21,738.736 rows=1,409,807 loops=1)

5. 1,443.684 21,523.143 ↑ 1.0 1,409,807 1

WindowAgg (cost=2,520,139.62..2,573,307.49 rows=1,417,810 width=359) (actual time=19,796.427..21,523.143 rows=1,409,807 loops=1)

6. 1,023.219 20,079.459 ↑ 1.0 1,409,807 1

Sort (cost=2,520,139.62..2,523,684.14 rows=1,417,810 width=84) (actual time=19,796.403..20,079.459 rows=1,409,807 loops=1)

  • Sort Key: last.agent_id, last.account_id, last.application_id, last.web_data_id, last.local_time
  • Sort Method: external merge Disk: 126528kB
7. 198.245 19,056.240 ↑ 1.0 1,409,807 1

Subquery Scan on last (cost=2,158,054.15..2,239,578.23 rows=1,417,810 width=84) (actual time=17,355.418..19,056.240 rows=1,409,807 loops=1)

8. 1,008.346 18,857.995 ↑ 1.0 1,409,807 1

WindowAgg (cost=2,158,054.15..2,225,400.13 rows=1,417,810 width=355) (actual time=17,355.417..18,857.995 rows=1,409,807 loops=1)

9. 3,126.935 17,849.649 ↑ 1.0 1,409,807 1

Sort (cost=2,158,054.15..2,161,598.68 rows=1,417,810 width=84) (actual time=17,355.400..17,849.649 rows=1,409,807 loops=1)

  • Sort Key: agent_event_2018_06_01.agent_id, agent_event_2018_06_01.account_id, agent_event_2018_06_01.application_id, agent_event_2018_06_01.web_data_id, ((date_trunc('hour'::text, agent_event_2018_06_01.local_time) + ((((date_part('minute'::text, agent_event_2018_06_01.local_time))::integer / 15))::double precision * '00:15:00'::interval))), agent_event_2018_06_01.local_time
  • Sort Method: external merge Disk: 129856kB
10. 0.000 14,722.714 ↑ 1.0 1,409,807 1

Gather (cost=3,350.02..1,877,492.77 rows=1,417,810 width=84) (actual time=1.608..14,722.714 rows=1,409,807 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
11. 0.000 15,360.706 ↑ 1.3 469,936 3

Parallel Append (cost=2,350.02..1,734,711.77 rows=590,759 width=84) (actual time=49.460..15,360.706 rows=469,936 loops=3)

12. 7,928.249 8,063.252 ↓ 2.3 261,188 1

Parallel Bitmap Heap Scan on agent_event_2018_06_01 (cost=6,694.19..627,450.30 rows=114,288 width=84) (actual time=139.745..8,063.252 rows=261,188 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 8
13. 135.003 135.003 ↑ 1.0 261,385 1

Bitmap Index Scan on agent_event_2018_06_01_d9d6a3fd (cost=0.00..6,625.62 rows=274,291 width=0) (actual time=135.002..135.003 rows=261,385 loops=1)

  • Index Cond: (event_type_id = 100500)
14. 692.226 699.119 ↓ 2.4 104,223 1

Parallel Bitmap Heap Scan on agent_event_2018_02_01 (cost=2,350.02..73,208.77 rows=43,057 width=84) (actual time=7.995..699.119 rows=104,223 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 17
15. 6.893 6.893 ↓ 1.0 104,240 1

Bitmap Index Scan on agent_event_2018_02_01_f9766e82 (cost=0.00..2,324.19 rows=103,435 width=0) (actual time=6.892..6.893 rows=104,240 loops=1)

  • Index Cond: (event_type_id = 100500)
16. 5,020.210 5,033.951 ↓ 2.3 57,048 1

Parallel Bitmap Heap Scan on agent_event_2018_08_01 (cost=1,209.39..39,592.57 rows=24,568 width=84) (actual time=16.077..5,033.951 rows=57,048 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
17. 13.741 13.741 ↑ 1.0 57,195 1

Bitmap Index Scan on agent_event_2018_08_01_dcde175f (cost=0.00..1,194.65 rows=58,964 width=0) (actual time=13.741..13.741 rows=57,195 loops=1)

  • Index Cond: (event_type_id = 100500)
18. 7,220.081 7,241.867 ↓ 2.5 41,397 1

Parallel Bitmap Heap Scan on agent_event_2018_09_01 (cost=827.38..84,379.69 rows=16,288 width=84) (actual time=25.836..7,241.867 rows=41,397 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
19. 21.786 21.786 ↓ 1.1 41,397 1

Bitmap Index Scan on agent_event_2018_09_01_23abcbc5 (cost=0.00..817.61 rows=39,091 width=0) (actual time=21.786..21.786 rows=41,397 loops=1)

  • Index Cond: (event_type_id = 100500)
20. 383.380 392.028 ↓ 2.4 19,145 1

Parallel Bitmap Heap Scan on agent_event_2017_11_01 (cost=430.45..7,299.53 rows=8,062 width=84) (actual time=8.901..392.028 rows=19,145 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 1
21. 8.648 8.648 ↑ 1.0 19,146 1

Bitmap Index Scan on agent_event_2017_11_01_c6c4f80b (cost=0.00..425.61 rows=19,359 width=0) (actual time=8.648..8.648 rows=19,146 loops=1)

  • Index Cond: (event_type_id = 100500)
22. 3,644.087 3,644.087 ↑ 1.3 26,362 3

Parallel Index Scan using agent_event_2018_10_01_54b94712 on agent_event_2018_10_01 (cost=0.43..175,775.40 rows=34,218 width=84) (actual time=1.088..3,644.087 rows=26,362 loops=3)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 0
23. 1,696.504 1,696.504 ↓ 1.3 62,577 2

Parallel Index Scan using agent_event_2018_01_01_07ec087f on agent_event_2018_01_01 (cost=0.43..164,900.67 rows=49,345 width=84) (actual time=0.731..1,696.504 rows=62,577 loops=2)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 6
24. 0.262 0.262 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2017_10_01_96c6549d on agent_event_2017_10_01 (cost=0.14..8.18 rows=1 width=84) (actual time=0.262..0.262 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
25. 0.242 0.242 ↓ 0.0 0 1

Parallel Index Scan using agent_event_2018_12_01_c6650f2a on agent_event_2018_12_01 (cost=0.14..8.18 rows=1 width=84) (actual time=0.242..0.242 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
26. 8,059.475 8,059.475 ↓ 2.4 311,393 1

Parallel Seq Scan on agent_event_2018_11_01 (cost=0.00..386,470.74 rows=128,381 width=84) (actual time=0.012..8,059.475 rows=311,393 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 4090926
27. 1,398.558 1,398.558 ↓ 2.4 279,022 1

Parallel Seq Scan on agent_event_2018_05_01 (cost=0.00..142,858.06 rows=116,486 width=84) (actual time=0.016..1,398.558 rows=279,022 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1724486
28. 639.120 639.120 ↓ 2.4 118,241 1

Parallel Seq Scan on agent_event_2018_04_01 (cost=0.00..27,956.19 rows=50,266 width=84) (actual time=1.587..639.120 rows=118,241 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 294965
29. 37.879 37.879 ↓ 1.7 13,909 1

Parallel Seq Scan on agent_event_2018_07_01 (cost=0.00..1,846.57 rows=8,181 width=84) (actual time=0.624..37.879 rows=13,909 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 16057
30. 0.003 0.003 ↓ 0.0 0 1

Parallel Seq Scan on agent_event_1600_01_01 (cost=0.00..1.07 rows=1 width=84) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 6
31. 0.002 0.002 ↓ 0.0 0 1

Parallel Seq Scan on agent_event_2017_12_01 (cost=0.00..1.03 rows=1 width=84) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1
32. 0.007 0.007 ↓ 0.0 0 1

Parallel Seq Scan on agent_event_2018_03_01 (cost=0.00..1.03 rows=1 width=84) (actual time=0.007..0.007 rows=0 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1