explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L6TO

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 3.717 ↑ 1.0 1 1

Limit (cost=76.14..176.95 rows=1 width=59) (actual time=3.716..3.717 rows=1 loops=1)

2.          

CTE target

3. 0.044 0.392 ↑ 1.0 1 1

Nested Loop (cost=4.68..75.69 rows=1 width=16) (actual time=0.310..0.392 rows=1 loops=1)

  • Join Filter: (cod.model_id = m.model_id)
  • Rows Removed by Join Filter: 13
4. 0.027 0.027 ↑ 1.0 1 1

Seq Scan on cq_machines m (cost=0.00..5.80 rows=1 width=16) (actual time=0.021..0.027 rows=1 loops=1)

  • Filter: (id = 86)
  • Rows Removed by Filter: 143
5. 0.036 0.321 ↑ 1.0 14 1

Nested Loop (cost=4.68..69.71 rows=14 width=16) (actual time=0.152..0.321 rows=14 loops=1)

6. 0.025 0.215 ↑ 1.0 14 1

Nested Loop (cost=4.39..64.33 rows=14 width=8) (actual time=0.141..0.215 rows=14 loops=1)

7. 0.014 0.147 ↑ 1.0 1 1

Nested Loop (cost=0.00..27.86 rows=1 width=8) (actual time=0.108..0.147 rows=1 loops=1)

  • Join Filter: (cl.id = me.data_class_id)
  • Rows Removed by Join Filter: 2
8. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on cq_data_class cl (cost=0.00..1.16 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: ((data_class_no)::text = '0200'::text)
  • Rows Removed by Filter: 12
9. 0.126 0.126 ↓ 1.5 3 1

Seq Scan on cq_message_formats me (cost=0.00..26.67 rows=2 width=16) (actual time=0.018..0.126 rows=3 loops=1)

  • Filter: ((byte_position = 1) AND (bit_position = 8))
  • Rows Removed by Filter: 775
10. 0.031 0.043 ↑ 1.0 14 1

Bitmap Heap Scan on cq_message_format_mappings memp (cost=4.39..36.33 rows=14 width=16) (actual time=0.022..0.043 rows=14 loops=1)

  • Recheck Cond: (message_format_id = me.id)
  • Heap Blocks: exact=14
11. 0.012 0.012 ↑ 1.0 14 1

Bitmap Index Scan on cq_message_format_mappings_index03 (cost=0.00..4.39 rows=14 width=0) (actual time=0.012..0.012 rows=14 loops=1)

  • Index Cond: (message_format_id = me.id)
12. 0.070 0.070 ↑ 1.0 1 14

Index Scan using cq_operation_data_index01 on cq_operation_data cod (cost=0.29..0.37 rows=1 width=16) (actual time=0.004..0.005 rows=1 loops=14)

  • Index Cond: (id = memp.operation_data_id)
13. 0.013 3.714 ↑ 116.0 1 1

Merge Join (cost=0.45..11,693.92 rows=116 width=59) (actual time=3.714..3.714 rows=1 loops=1)

  • Merge Cond: (codh.machine_id = target.machine_id)
  • Join Filter: (codh.operation_data_id = target.operation_data_id)
14. 3.265 3.265 ↑ 73,849.0 1 1

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history codh (cost=0.42..10,216.62 rows=73,849 width=27) (actual time=3.265..3.265 rows=1 loops=1)

  • Index Cond: (acquisition_time >= '2019-03-17 00:00:00+09'::timestamp with time zone)
15. 0.019 0.436 ↑ 1.0 1 1

Materialize (cost=0.03..0.04 rows=1 width=48) (actual time=0.436..0.436 rows=1 loops=1)

16. 0.020 0.417 ↑ 1.0 1 1

Sort (cost=0.03..0.04 rows=1 width=48) (actual time=0.417..0.417 rows=1 loops=1)

  • Sort Key: target.machine_id
  • Sort Method: quicksort Memory: 25kB
17. 0.397 0.397 ↑ 1.0 1 1

CTE Scan on target (cost=0.00..0.02 rows=1 width=48) (actual time=0.314..0.397 rows=1 loops=1)

Planning time : 1.246 ms
Execution time : 4.091 ms