explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Puth

Settings
# exclusive inclusive rows x rows loops node
1. 0.043 305.267 ↑ 1.0 1 1

Limit (cost=970.58..970.58 rows=1 width=59) (actual time=305.258..305.267 rows=1 loops=1)

2.          

CTE target

3. 0.229 6.796 ↑ 1.0 1 1

Nested Loop (cost=4.82..78.05 rows=1 width=16) (actual time=5.634..6.796 rows=1 loops=1)

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

Index Scan using cq_machines_index01 on cq_machines m (cost=0.14..8.16 rows=1 width=16) (actual time=0.191..0.203 rows=1 loops=1)

  • Index Cond: (id = 86)
5. 0.595 6.364 ↑ 1.0 14 1

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

6. 0.314 2.829 ↑ 1.0 14 1

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

7. 0.132 1.237 ↑ 1.0 1 1

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

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

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

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

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

  • Filter: ((byte_position = 1) AND (bit_position = 8))
  • Rows Removed by Filter: 775
10. 0.906 1.278 ↑ 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.444..1.278 rows=14 loops=1)

  • Recheck Cond: (message_format_id = me.id)
  • Heap Blocks: exact=14
11. 0.372 0.372 ↑ 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.372..0.372 rows=14 loops=1)

  • Index Cond: (message_format_id = me.id)
12. 2.940 2.940 ↑ 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.200..0.210 rows=1 loops=14)

  • Index Cond: (id = memp.operation_data_id)
13. 21.741 305.224 ↑ 115.0 1 1

Sort (cost=892.53..892.82 rows=115 width=59) (actual time=305.224..305.224 rows=1 loops=1)

  • Sort Key: codh.machine_id, codh.acquisition_time, codh.operation_data_id
  • Sort Method: top-N heapsort Memory: 25kB
14. 42.742 283.483 ↓ 18.6 2,139 1

Nested Loop (cost=0.57..891.95 rows=115 width=59) (actual time=18.379..283.483 rows=2,139 loops=1)

15. 6.839 6.839 ↑ 1.0 1 1

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

16. 233.902 233.902 ↓ 18.6 2,139 1

Index Scan using cq_operation_data_history_index04 on cq_operation_data_history codh (cost=0.57..890.50 rows=115 width=27) (actual time=12.613..233.902 rows=2,139 loops=1)

  • Index Cond: ((operation_data_id = target.operation_data_id) AND (machine_id = target.machine_id))
  • Filter: (acquisition_time >= '2019-03-17 00:00:00+00'::timestamp with time zone)
  • Rows Removed by Filter: 1647
Planning time : 93.344 ms
Execution time : 306.229 ms