explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EXF1

Settings
# exclusive inclusive rows x rows loops node
1. 3,331.867 7,943.843 ↓ 0.0 0 1

Limit (cost=1,924,756.2..1,962,499.71 rows=6,875 width=2) (actual time=7,943.843..7,943.843 rows=0 loops=1)

  • Buffers: shared hit=303,282 read=362,209 written=25
2.          

CTE running

3. 0.132 4,611.958 ↓ 0.0 0 1

Append (cost=0..1,809,690.62 rows=743,469 width=19) (actual time=4,611.958..4,611.958 rows=0 loops=1)

  • Buffers: shared hit=303,282 read=362,209 written=25
4. 0.025 0.025 ↓ 0.0 0 1

Seq Scan on running_operations g (cost=0..0 rows=1 width=54) (actual time=0.025..0.025 rows=0 loops=1)

  • Filter: ((NOT g.frozen) AND (NOT g.forced) AND (g.portal_id = 13,951) AND (g.scheduled_time <= CURRENT_DATE) AND (g.day >= CURRENT_DATE))
5. 4,032.833 4,032.833 ↓ 0.0 0 1

Index Scan using running_operations_portal_id_idx_1 on running_operations g_1 (cost=0.56..1,202,450.56 rows=743,318 width=19) (actual time=4,032.833..4,032.833 rows=0 loops=1)

  • Index Cond: (g_1.portal_id = 13,951)
  • Filter: ((NOT g_1.frozen) AND (NOT g_1.forced) AND (g_1.scheduled_time <= CURRENT_DATE) AND (g_1.day >= CURRENT_DATE))
  • Buffers: shared hit=183,082 read=362,209 written=25
6. 0.025 0.025 ↓ 0.0 0 1

Seq Scan on running_operations g_2 (cost=0..11.57 rows=1 width=54) (actual time=0.025..0.025 rows=0 loops=1)

  • Filter: ((NOT g_2.frozen) AND (NOT g_2.forced) AND (g_2.portal_id = 13,951) AND (g_2.scheduled_time <= CURRENT_DATE) AND (g_2.day >= CURRENT_DATE))
7. 0.022 0.146 ↓ 0.0 0 1

Bitmap Heap Scan on running_operations g_3 (cost=1.24..2.36 rows=1 width=19) (actual time=0.146..0.146 rows=0 loops=1)

  • Filter: ((NOT g_3.frozen) AND (NOT g_3.forced) AND (g_3.portal_id = 13,951) AND (g_3.scheduled_time <= CURRENT_DATE))
  • Buffers: shared hit=4
8. 0.124 0.124 ↓ 26.0 26 1

Bitmap Index Scan on day_running_operations_idx (cost=0..1.24 rows=1 width=0) (actual time=0.124..0.124 rows=26 loops=1)

  • Index Cond: (g_3.day >= CURRENT_DATE)
  • Buffers: shared hit=1
9. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on running_operations g_4 (cost=0..11.57 rows=1 width=54) (actual time=0.007..0.008 rows=0 loops=1)

  • Filter: ((NOT g_4.frozen) AND (NOT g_4.forced) AND (g_4.portal_id = 13,951) AND (g_4.scheduled_time <= CURRENT_DATE) AND (g_4.day >= CURRENT_DATE))
10. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on running_operations g_5 (cost=0..17.43 rows=1 width=19) (actual time=0.009..0.009 rows=0 loops=1)

  • Filter: ((NOT g_5.frozen) AND (NOT g_5.forced) AND (g_5.portal_id = 13,951) AND (g_5.scheduled_time <= CURRENT_DATE) AND (g_5.day >= CURRENT_DATE))
11. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on running_operations g_6 (cost=0..1 rows=1 width=20) (actual time=0.013..0.013 rows=0 loops=1)

  • Filter: ((NOT g_6.frozen) AND (NOT g_6.forced) AND (g_6.portal_id = 13,951) AND (g_6.scheduled_time <= CURRENT_DATE) AND (g_6.day >= CURRENT_DATE))
  • Buffers: shared hit=1
12. 3.358 3.358 ↓ 0.0 0 1

Seq Scan on running_operations g_7 (cost=0..1,184.55 rows=1 width=19) (actual time=3.358..3.358 rows=0 loops=1)

  • Filter: ((NOT g_7.frozen) AND (NOT g_7.forced) AND (g_7.portal_id = 13,951) AND (g_7.scheduled_time <= CURRENT_DATE) AND (g_7.day >= CURRENT_DATE))
  • Buffers: shared hit=991
13. 2.286 2.286 ↓ 0.0 0 1

Seq Scan on running_operations g_8 (cost=0..827.16 rows=1 width=19) (actual time=2.286..2.286 rows=0 loops=1)

  • Filter: ((NOT g_8.frozen) AND (NOT g_8.forced) AND (g_8.portal_id = 13,951) AND (g_8.scheduled_time <= CURRENT_DATE) AND (g_8.day >= CURRENT_DATE))
  • Buffers: shared hit=735
14. 0.014 0.014 ↓ 0.0 0 1

Seq Scan on running_operations g_9 (cost=0..12.7 rows=1 width=19) (actual time=0.014..0.014 rows=0 loops=1)

  • Filter: ((NOT g_9.frozen) AND (NOT g_9.forced) AND (g_9.portal_id = 13,951) AND (g_9.scheduled_time <= CURRENT_DATE) AND (g_9.day >= CURRENT_DATE))
  • Buffers: shared hit=1
15. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on running_operations g_10 (cost=0..11.57 rows=1 width=54) (actual time=0.009..0.009 rows=0 loops=1)

  • Filter: ((NOT g_10.frozen) AND (NOT g_10.forced) AND (g_10.portal_id = 13,951) AND (g_10.scheduled_time <= CURRENT_DATE) AND (g_10.day >= CURRENT_DATE))
16. 7.593 7.593 ↓ 0.0 0 1

Seq Scan on running_operations g_11 (cost=0..1,968.39 rows=1 width=19) (actual time=7.593..7.593 rows=0 loops=1)

  • Filter: ((NOT g_11.frozen) AND (NOT g_11.forced) AND (g_11.portal_id = 13,951) AND (g_11.scheduled_time <= CURRENT_DATE) AND (g_11.day >= CURRENT_DATE))
  • Buffers: shared hit=1,298
17. 14.044 14.044 ↓ 0.0 0 1

Seq Scan on running_operations g_12 (cost=0..4,391.74 rows=1 width=19) (actual time=14.044..14.044 rows=0 loops=1)

  • Filter: ((NOT g_12.frozen) AND (NOT g_12.forced) AND (g_12.portal_id = 13,951) AND (g_12.scheduled_time <= CURRENT_DATE) AND (g_12.day >= CURRENT_DATE))
  • Buffers: shared hit=2,888
18. 1.250 1.250 ↓ 0.0 0 1

Seq Scan on running_operations g_13 (cost=0..449.16 rows=1 width=20) (actual time=1.25..1.25 rows=0 loops=1)

  • Filter: ((NOT g_13.frozen) AND (NOT g_13.forced) AND (g_13.portal_id = 13,951) AND (g_13.scheduled_time <= CURRENT_DATE) AND (g_13.day >= CURRENT_DATE))
  • Buffers: shared hit=366
19. 383.395 383.395 ↓ 0.0 0 1

Seq Scan on running_operations g_14 (cost=0..122,354.3 rows=29 width=19) (actual time=383.395..383.395 rows=0 loops=1)

  • Filter: ((NOT g_14.frozen) AND (NOT g_14.forced) AND (g_14.portal_id = 13,951) AND (g_14.scheduled_time <= CURRENT_DATE) AND (g_14.day >= CURRENT_DATE))
  • Buffers: shared hit=77,195
20. 0.017 0.017 ↓ 0.0 0 1

Seq Scan on running_operations g_15 (cost=0..12.7 rows=1 width=19) (actual time=0.016..0.017 rows=0 loops=1)

  • Filter: ((NOT g_15.frozen) AND (NOT g_15.forced) AND (g_15.portal_id = 13,951) AND (g_15.scheduled_time <= CURRENT_DATE) AND (g_15.day >= CURRENT_DATE))
21. 22.488 22.488 ↓ 0.0 0 1

Seq Scan on running_operations g_16 (cost=0..9,235.37 rows=1 width=19) (actual time=22.488..22.488 rows=0 loops=1)

  • Filter: ((NOT g_16.frozen) AND (NOT g_16.forced) AND (g_16.portal_id = 13,951) AND (g_16.scheduled_time <= CURRENT_DATE) AND (g_16.day >= CURRENT_DATE))
  • Buffers: shared hit=7,947
22. 0.023 0.023 ↓ 0.0 0 1

Seq Scan on running_operations g_17 (cost=0..12.7 rows=1 width=19) (actual time=0.023..0.023 rows=0 loops=1)

  • Filter: ((NOT g_17.frozen) AND (NOT g_17.forced) AND (g_17.portal_id = 13,951) AND (g_17.scheduled_time <= CURRENT_DATE) AND (g_17.day >= CURRENT_DATE))
23. 77.070 77.070 ↓ 0.0 0 1

Seq Scan on running_operations g_18 (cost=0..22,729.64 rows=3 width=19) (actual time=77.07..77.07 rows=0 loops=1)

  • Filter: ((NOT g_18.frozen) AND (NOT g_18.forced) AND (g_18.portal_id = 13,951) AND (g_18.scheduled_time <= CURRENT_DATE) AND (g_18.day >= CURRENT_DATE))
  • Buffers: shared hit=16,554
24. 3.595 3.595 ↓ 0.0 0 1

Seq Scan on running_operations g_19 (cost=0..1,177.48 rows=1 width=19) (actual time=3.595..3.595 rows=0 loops=1)

  • Filter: ((NOT g_19.frozen) AND (NOT g_19.forced) AND (g_19.portal_id = 13,951) AND (g_19.scheduled_time <= CURRENT_DATE) AND (g_19.day >= CURRENT_DATE))
  • Buffers: shared hit=908
25. 23.792 23.792 ↓ 0.0 0 1

Index Scan using running_operations_entity_id_scheduled_time_day_idx on running_operations g_20 (cost=0.43..428,610.21 rows=96 width=19) (actual time=23.792..23.792 rows=0 loops=1)

  • Index Cond: ((g_20.scheduled_time <= CURRENT_DATE) AND (g_20.day >= CURRENT_DATE))
  • Filter: ((NOT g_20.forced) AND (g_20.portal_id = 13,951))
  • Buffers: shared hit=4,476
26. 9.768 9.768 ↓ 0.0 0 1

Seq Scan on running_operations g_21 (cost=0..2,078.67 rows=1 width=19) (actual time=9.768..9.768 rows=0 loops=1)

  • Filter: ((NOT g_21.frozen) AND (NOT g_21.forced) AND (g_21.portal_id = 13,951) AND (g_21.scheduled_time <= CURRENT_DATE) AND (g_21.day >= CURRENT_DATE))
  • Buffers: shared hit=1,362
27. 12.195 12.195 ↓ 0.0 0 1

Seq Scan on running_operations g_22 (cost=0..4,149.37 rows=1 width=19) (actual time=12.195..12.195 rows=0 loops=1)

  • Filter: ((NOT g_22.frozen) AND (NOT g_22.forced) AND (g_22.portal_id = 13,951) AND (g_22.scheduled_time <= CURRENT_DATE) AND (g_22.day >= CURRENT_DATE))
  • Buffers: shared hit=3,104
28. 0.019 0.019 ↓ 0.0 0 1

Seq Scan on running_operations g_23 (cost=0..11.57 rows=1 width=54) (actual time=0.019..0.019 rows=0 loops=1)

  • Filter: ((NOT g_23.frozen) AND (NOT g_23.forced) AND (g_23.portal_id = 13,951) AND (g_23.scheduled_time <= CURRENT_DATE) AND (g_23.day >= CURRENT_DATE))
29. 0.437 0.437 ↓ 0.0 0 1

Seq Scan on running_operations g_24 (cost=0..153.11 rows=1 width=19) (actual time=0.437..0.437 rows=0 loops=1)

  • Filter: ((NOT g_24.frozen) AND (NOT g_24.forced) AND (g_24.portal_id = 13,951) AND (g_24.scheduled_time <= CURRENT_DATE) AND (g_24.day >= CURRENT_DATE))
  • Buffers: shared hit=137
30. 17.394 17.394 ↓ 0.0 0 1

Seq Scan on running_operations g_25 (cost=0..4,096.81 rows=1 width=19) (actual time=17.394..17.394 rows=0 loops=1)

  • Filter: ((NOT g_25.frozen) AND (NOT g_25.forced) AND (g_25.portal_id = 13,951) AND (g_25.scheduled_time <= CURRENT_DATE) AND (g_25.day >= CURRENT_DATE))
  • Buffers: shared hit=2,233
31. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on running_operations g_26 (cost=0..11.57 rows=1 width=54) (actual time=0.02..0.02 rows=0 loops=1)

  • Filter: ((NOT g_26.frozen) AND (NOT g_26.forced) AND (g_26.portal_id = 13,951) AND (g_26.scheduled_time <= CURRENT_DATE) AND (g_26.day >= CURRENT_DATE))
32. 0.011 4,611.976 ↓ 0.0 0 1

Hash Join (cost=115,065.58..152,809.09 rows=6,875 width=2) (actual time=4,611.975..4,611.976 rows=0 loops=1)

  • Buffers: shared hit=303,282 read=362,209 written=25
33. 4,611.965 4,611.965 ↓ 0.0 0 1

CTE Scan on running a (cost=0..14,869.38 rows=743,469 width=54) (actual time=4,611.965..4,611.965 rows=0 loops=1)

  • Buffers: shared hit=303,282 read=362,209 written=25
34. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=113,037.51..113,037.51 rows=74,347 width=54) (never executed)

35. 0.000 0.000 ↓ 0.0 0 0

Subquery Scan on b (cost=102,257.2..113,037.51 rows=74,347 width=54) (never executed)

36. 0.000 0.000 ↓ 0.0 0 0

Aggregate (cost=102,257.2..112,294.04 rows=74,347 width=54) (never executed)

37. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=102,257.2..104,115.88 rows=743,469 width=54) (never executed)

  • Sort Key: a_1.entity_id, a_1.day, a_1.key
38. 0.000 0.000 ↓ 0.0 0 0

CTE Scan on running a_1 (cost=0..14,869.38 rows=743,469 width=54) (never executed)

Planning time : 8.699 ms
Execution time : 7,971.927 ms