explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 01ym

Settings
# exclusive inclusive rows x rows loops node
1. 6.332 18.737 ↓ 9.5 697 1

Limit (cost=320.56..558.52 rows=73 width=90) (actual time=0.127..18.737 rows=697 loops=1)

2.          

CTE add_1

3. 1.058 1.058 ↓ 17.0 17 1

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history h_1 (cost=0.56..311.37 rows=1 width=8) (actual time=0.040..1.058 rows=17 loops=1)

  • Index Cond: ((machine_id = 18) AND (acquisition_time >= '2019-03-31 15:00:00+00'::timestamp with time zone) AND (acquisition_time < '2019-04-01 15:00:00+00'::timestamp with time zone) AND (operation_data_id = 3220))
  • Filter: (number_data = 63::numeric)
  • Rows Removed by Filter: 207
4.          

CTE add_2

5. 0.330 1.814 ↓ 17.0 17 1

Nested Loop (cost=0.56..8.62 rows=1 width=8) (actual time=0.080..1.814 rows=17 loops=1)

6. 1.229 1.229 ↓ 17.0 17 1

CTE Scan on add_1 (cost=0.00..0.02 rows=1 width=8) (actual time=0.050..1.229 rows=17 loops=1)

7. 0.255 0.255 ↑ 1.0 1 17

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history hd (cost=0.56..8.60 rows=1 width=8) (actual time=0.010..0.015 rows=1 loops=17)

  • Index Cond: ((machine_id = 18) AND (acquisition_time = add_1.acquisition_time) AND (acquisition_time >= '2019-03-31 15:00:00+00'::timestamp with time zone) AND (acquisition_time < '2019-04-01 15:00:00+00'::timestamp with time zone) AND (operation_data_id = 3221))
  • Filter: ((string_data)::text = '65951 TDK3050 '::text)
8. 6.649 12.405 ↓ 9.5 697 1

Nested Loop (cost=0.56..238.53 rows=73 width=90) (actual time=0.117..12.405 rows=697 loops=1)

9. 1.982 1.982 ↓ 17.0 17 1

CTE Scan on add_2 (cost=0.00..0.02 rows=1 width=8) (actual time=0.090..1.982 rows=17 loops=1)

10. 3.774 3.774 ↑ 1.8 41 17

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history h (cost=0.56..237.78 rows=73 width=82) (actual time=0.010..0.222 rows=41 loops=17)

  • Index Cond: ((machine_id = 18) AND (acquisition_time = add_2.acquisition_time))