explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hbpQ

Settings
# exclusive inclusive rows x rows loops node
1. 6.724 22.944 ↓ 697.0 697 1

Limit (cost=320.56..328.62 rows=1 width=90) (actual time=0.130..22.944 rows=697 loops=1)

2.          

CTE add_1

3. 1.083 1.083 ↓ 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.043..1.083 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.343 1.885 ↓ 17.0 17 1

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

6. 1.253 1.253 ↓ 17.0 17 1

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

7. 0.289 0.289 ↑ 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.012..0.017 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.722 16.220 ↓ 697.0 697 1

Nested Loop (cost=0.56..8.62 rows=1 width=90) (actual time=0.121..16.220 rows=697 loops=1)

9. 2.052 2.052 ↓ 17.0 17 1

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

10. 7.446 7.446 ↓ 41.0 41 17

Index Scan using cq_operation_data_history_index02 on cq_operation_data_history h (cost=0.56..8.59 rows=1 width=82) (actual time=0.010..0.438 rows=41 loops=17)

  • Index Cond: ((machine_id = 18) AND (acquisition_time = add_2.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))
Planning time : 0.634 ms
Execution time : 26.207 ms