explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s4f3

Settings
# exclusive inclusive rows x rows loops node
1. 32.260 32.260 ↑ 4.7 30 1

CTE Scan on tmp_data (cost=79,697.70..79,700.54 rows=142 width=260) (actual time=24.189..32.260 rows=30 loops=1)

2.          

CTE args

3. 0.008 0.008 ↑ 410.0 1 1

Seq Scan on sites (cost=0.00..14.10 rows=410 width=208) (actual time=0.007..0.008 rows=1 loops=1)

4.          

CTE args_choices

5. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.01..21,635.71 rows=4,100,000 width=64) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.01..828.21 rows=41,000 width=64) (never executed)

7. 0.000 0.000 ↓ 0.0 0

CTE Scan on args (cost=0.00..8.20 rows=410 width=32) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Function Scan on jsonb_each configs (cost=0.01..1.01 rows=100 width=64) (never executed)

9.          

CTE option_choices

10. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=26.88..46.23 rows=740 width=80) (never executed)

  • Hash Cond: (choices.option_id = options.id)
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on choices (cost=0.00..17.40 rows=740 width=64) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Hash (cost=17.50..17.50 rows=750 width=48) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Seq Scan on options (cost=0.00..17.50 rows=750 width=48) (never executed)

14.          

CTE tmp_sn

15. 0.000 23.725 ↑ 1.0 10 1

Limit (cost=41,443.93..41,444.01 rows=10 width=24) (actual time=23.714..23.725 rows=10 loops=1)

16.          

Initplan (forLimit)

17. 0.001 0.001 ↑ 410.0 1 1

CTE Scan on args args_1 (cost=0.00..8.20 rows=410 width=8) (actual time=0.001..0.001 rows=1 loops=1)

18. 0.001 0.001 ↑ 410.0 1 1

CTE Scan on args args_2 (cost=0.00..8.20 rows=410 width=8) (actual time=0.000..0.001 rows=1 loops=1)

19. 0.013 0.013 ↑ 410.0 1 1

CTE Scan on args args_3 (cost=0.00..8.20 rows=410 width=32) (actual time=0.011..0.013 rows=1 loops=1)

20. 0.001 0.001 ↑ 410.0 1 1

CTE Scan on args args_4 (cost=0.00..8.20 rows=410 width=32) (actual time=0.001..0.001 rows=1 loops=1)

21. 0.006 23.720 ↑ 3.3 10 1

Unique (cost=41,411.13..41,411.38 rows=33 width=24) (actual time=23.713..23.720 rows=10 loops=1)

22. 0.716 23.714 ↑ 3.3 10 1

Sort (cost=41,411.13..41,411.21 rows=33 width=24) (actual time=23.712..23.714 rows=10 loops=1)

  • Sort Key: m_logs_v2.root_serial_type, m_logs_v2.root_serial
  • Sort Method: quicksort Memory: 55kB
23. 1.800 22.998 ↓ 11.7 386 1

Nested Loop (cost=0.57..41,410.30 rows=33 width=24) (actual time=19.211..22.998 rows=386 loops=1)

  • Join Filter: (m_logs_v2.process_id = processes.id)
  • Rows Removed by Join Filter: 15886
24. 0.045 0.045 ↓ 3.0 3 1

Seq Scan on processes (cost=0.00..2.92 rows=1 width=16) (actual time=0.031..0.045 rows=3 loops=1)

  • Filter: (name = $6)
  • Rows Removed by Filter: 124
25. 2.169 21.153 ↓ 2.2 5,424 3

Nested Loop (cost=0.57..41,376.89 rows=2,439 width=40) (actual time=0.037..7.051 rows=5,424 loops=3)

26. 0.006 0.042 ↑ 3.0 1 3

Nested Loop (cost=0.00..83.47 rows=3 width=16) (actual time=0.010..0.014 rows=1 loops=3)

  • Join Filter: (components.project_id = projects.id)
  • Rows Removed by Join Filter: 2
27. 0.009 0.009 ↑ 250.0 3 3

Seq Scan on components (cost=0.00..17.50 rows=750 width=32) (actual time=0.002..0.003 rows=3 loops=3)

28. 0.016 0.027 ↑ 4.0 1 9

Materialize (cost=0.00..21.02 rows=4 width=16) (actual time=0.002..0.003 rows=1 loops=9)

29. 0.011 0.011 ↑ 4.0 1 1

Seq Scan on projects (cost=0.00..21.00 rows=4 width=16) (actual time=0.008..0.011 rows=1 loops=1)

  • Filter: (name = $7)
  • Rows Removed by Filter: 2
30. 18.942 18.942 ↑ 49.5 5,424 3

Index Scan using m_logs_v2_component_id_created_idx on m_logs_v2 (cost=0.57..11,081.19 rows=268,328 width=56) (actual time=0.025..6.314 rows=5,424 loops=3)

  • Index Cond: ((component_id = components.id) AND (created >= $4) AND (created < $5))
31.          

CTE tmp_data

32. 6.923 31.387 ↑ 4.7 30 1

Nested Loop (cost=0.57..16,557.65 rows=142 width=294) (actual time=24.151..31.387 rows=30 loops=1)

33. 0.305 24.224 ↑ 4.7 30 1

Nested Loop (cost=0.00..16,401.48 rows=142 width=154) (actual time=23.767..24.224 rows=30 loops=1)

  • Join Filter: (m_logs_v2_1.process_id = processes_1.id)
  • Rows Removed by Join Filter: 2320
34. 0.040 23.919 ↑ 5.5 239 1

Nested Loop (cost=0.00..16,242.10 rows=1,313 width=170) (actual time=23.727..23.919 rows=239 loops=1)

35. 23.729 23.729 ↑ 1.0 10 1

CTE Scan on tmp_sn (cost=0.00..0.20 rows=10 width=64) (actual time=23.715..23.729 rows=10 loops=1)

36. 0.150 0.150 ↑ 13.7 24 10

Index Scan using m_logs_v2_root_serial_idx on m_logs_v2 m_logs_v2_1 (cost=0.00..1,620.91 rows=328 width=130) (actual time=0.004..0.015 rows=24 loops=10)

  • Index Cond: (root_serial = tmp_sn.serial)
  • Filter: (last AND (tmp_sn.serial_type = root_serial_type))
  • Rows Removed by Filter: 1
37. 0.000 0.000 ↓ 1.2 10 239

Materialize (cost=0.00..3.52 rows=8 width=16) (actual time=0.000..0.000 rows=10 loops=239)

38. 0.028 0.028 ↓ 1.2 10 1

Seq Scan on processes processes_1 (cost=0.00..3.48 rows=8 width=16) (actual time=0.008..0.028 rows=10 loops=1)

  • Filter: (name = ANY ('{sp-wld1,sp-wld2,bg-assy,br-bd-wld,br-sp-wld,trim-sp-wld,ump-t3,ump-t1}'::text[]))
  • Rows Removed by Filter: 117
39. 0.240 0.240 ↑ 1.0 1 30

Index Scan using logs_v2_pkey on logs_v2 (cost=0.57..1.08 rows=1 width=821) (actual time=0.008..0.008 rows=1 loops=30)

  • Index Cond: (id = m_logs_v2_1.id)
Planning time : 1.814 ms
Execution time : 32.551 ms