explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DrI0

Settings
# exclusive inclusive rows x rows loops node
1. 63.820 19,959.949 ↓ 3.1 432,472 1

Subquery Scan on analytics_session_view (cost=2,867,616.41..2,926,447.07 rows=141,761 width=148) (actual time=18,886.027..19,959.949 rows=432,472 loops=1)

2. 789.739 19,896.129 ↓ 3.1 432,472 1

GroupAggregate (cost=2,867,616.41..2,925,029.46 rows=141,761 width=156) (actual time=18,886.026..19,896.129 rows=432,472 loops=1)

  • Group Key: sessions.global_session_id, sessions.agent_id, sessions.account_id, sessions.application_id, sessions.web_data_id
3. 890.139 19,106.390 ↑ 1.0 1,409,420 1

Sort (cost=2,867,616.41..2,871,160.42 rows=1,417,606 width=84) (actual time=18,885.999..19,106.390 rows=1,409,420 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: 129832kB
4. 207.434 18,216.251 ↑ 1.0 1,409,420 1

Subquery Scan on sessions (cost=2,519,762.05..2,587,098.34 rows=1,417,606 width=84) (actual time=16,453.947..18,216.251 rows=1,409,420 loops=1)

5. 1,323.085 18,008.817 ↑ 1.0 1,409,420 1

WindowAgg (cost=2,519,762.05..2,572,922.28 rows=1,417,606 width=359) (actual time=16,453.946..18,008.817 rows=1,409,420 loops=1)

6. 980.418 16,685.732 ↑ 1.0 1,409,420 1

Sort (cost=2,519,762.05..2,523,306.07 rows=1,417,606 width=84) (actual time=16,429.348..16,685.732 rows=1,409,420 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: 126488kB
7. 208.377 15,705.314 ↑ 1.0 1,409,420 1

Subquery Scan on last (cost=2,157,731.63..2,239,243.98 rows=1,417,606 width=84) (actual time=14,006.166..15,705.314 rows=1,409,420 loops=1)

8. 1,018.625 15,496.937 ↑ 1.0 1,409,420 1

WindowAgg (cost=2,157,731.63..2,225,067.92 rows=1,417,606 width=355) (actual time=14,006.165..15,496.937 rows=1,409,420 loops=1)

9. 3,134.082 14,478.312 ↑ 1.0 1,409,420 1

Sort (cost=2,157,731.63..2,161,275.65 rows=1,417,606 width=84) (actual time=14,006.147..14,478.312 rows=1,409,420 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'::
  • Sort Method: external merge Disk: 129824kB
10. 0.000 11,344.230 ↑ 1.0 1,409,420 1

Gather (cost=3,350.02..1,877,213.56 rows=1,417,606 width=84) (actual time=2.020..11,344.230 rows=1,409,420 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
11. 0.000 11,889.556 ↑ 1.3 469,807 3

Parallel Append (cost=2,350.02..1,734,452.96 rows=590,674 width=84) (actual time=10.242..11,889.556 rows=469,807 loops=3)

12. 332.563 350.741 ↓ 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=22.308..350.741 rows=261,188 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 8
13. 18.178 18.178 ↑ 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=18.178..18.178 rows=261,385 loops=1)

  • Index Cond: (event_type_id = 100500)
14. 124.026 131.221 ↓ 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=8.330..131.221 rows=104,223 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 17
15. 7.195 7.195 ↓ 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=7.195..7.195 rows=104,240 loops=1)

  • Index Cond: (event_type_id = 100500)
16. 118.734 123.882 ↓ 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=7.220..123.882 rows=57,048 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
17. 5.148 5.148 ↑ 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=5.148..5.148 rows=57,195 loops=1)

  • Index Cond: (event_type_id = 100500)
18. 1,227.615 1,232.255 ↓ 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=8.531..1,232.255 rows=41,397 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
19. 4.640 4.640 ↓ 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=4.640..4.640 rows=41,397 loops=1)

  • Index Cond: (event_type_id = 100500)
20. 26.573 27.587 ↓ 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=1.230..27.587 rows=19,145 loops=1)

  • Recheck Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 1
21. 1.014 1.014 ↑ 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=1.014..1.014 rows=19,146 loops=1)

  • Index Cond: (event_type_id = 100500)
22. 4,966.630 4,966.630 ↑ 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.070..4,966.630 rows=26,362 loops=3)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 0
23. 163.706 163.706 ↓ 2.5 125,154 1

Parallel Index Scan using agent_event_2018_01_01_07ec087f on agent_event_2018_01_01 (cost=0.43..164,899.05 rows=49,345 width=84) (actual time=0.052..163.706 rows=125,154 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
  • Rows Removed by Filter: 13
24. 0.029 0.029 ↓ 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.029..0.029 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
25. 0.008 0.008 ↓ 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.008..0.008 rows=0 loops=1)

  • Index Cond: (event_type_id = 100500)
  • Filter: (activity_time < '60000000000'::bigint)
26. 8,781.625 8,781.625 ↓ 1.2 155,503 2

Parallel Seq Scan on agent_event_2018_11_01 (cost=0.00..386,213.99 rows=128,296 width=84) (actual time=2.841..8,781.625 rows=155,503 loops=2)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 2044166
27. 788.923 788.923 ↓ 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.018..788.923 rows=279,022 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 1724486
28. 193.065 193.065 ↓ 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=0.206..193.065 rows=118,241 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 294965
29. 17.373 17.373 ↓ 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.070..17.373 rows=13,909 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 16057
30. 0.005 0.005 ↓ 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.005..0.005 rows=0 loops=1)

  • Filter: ((activity_time < '60000000000'::bigint) AND (event_type_id = 100500))
  • Rows Removed by Filter: 6
31. 0.003 0.003 ↓ 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.003..0.003 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