explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wdnz

Settings
# exclusive inclusive rows x rows loops node
1. 0.590 31,847.071 ↓ 416.7 7,501 1

Subquery Scan on vm (cost=582,519.28..582,519.51 rows=18 width=89) (actual time=31,845.956..31,847.071 rows=7,501 loops=1)

2. 0.301 31,846.481 ↓ 416.7 7,501 1

Limit (cost=582,519.28..582,519.33 rows=18 width=89) (actual time=31,845.953..31,846.481 rows=7,501 loops=1)

3. 14.598 31,846.180 ↓ 416.7 7,501 1

Sort (cost=582,519.28..582,519.33 rows=18 width=89) (actual time=31,845.953..31,846.180 rows=7,501 loops=1)

  • Sort Key: m.start_time DESC
  • Sort Method: top-N heapsort Memory: 2494kB
4. 2.926 31,831.582 ↓ 1,385.3 24,935 1

Gather (cost=9,215.60..582,518.91 rows=18 width=89) (actual time=1,335.983..31,831.582 rows=24,935 loops=1)

  • Workers Planned: 6
  • Workers Launched: 0
5. 9,857.177 31,828.656 ↓ 8,311.7 24,935 1

Nested Loop Semi Join (cost=8,215.60..581,517.11 rows=3 width=89) (actual time=1,335.559..31,828.656 rows=24,935 loops=1)

  • Join Filter: (measurements.measurement_id = measurement_files_1.measurement_id)
6. 1,381.088 21,971.130 ↓ 238.9 28,190 1

Nested Loop Semi Join (cost=8,214.46..330,853.04 rows=118 width=97) (actual time=1,335.542..21,971.130 rows=28,190 loops=1)

7. 797.891 20,589.993 ↓ 6.2 28,190 1

Merge Join (cost=8,213.90..327,416.45 rows=4,538 width=93) (actual time=1,335.509..20,589.993 rows=28,190 loops=1)

  • Merge Cond: (m.measurement_id = measurements.measurement_id)
8. 19,778.900 19,778.900 ↓ 6.0 9,529,637 1

Parallel Index Scan using pkey_measurements on measurements m (cost=0.44..315,049.39 rows=1,588,824 width=89) (actual time=0.005..19,778.900 rows=9,529,637 loops=1)

9. 7.499 13.202 ↓ 1.0 28,190 1

Sort (cost=8,213.46..8,281.54 rows=27,230 width=4) (actual time=10.199..13.202 rows=28,190 loops=1)

  • Sort Key: measurements.measurement_id
  • Sort Method: quicksort Memory: 2090kB
10. 5.703 5.703 ↓ 1.0 28,190 1

Index Scan using idx_measurements_start_time on measurements (cost=0.44..6,207.57 rows=27,230 width=4) (actual time=0.010..5.703 rows=28,190 loops=1)

  • Index Cond: ((start_time > '2019-02-04 00:00:00'::timestamp without time zone) AND (start_time < '2019-02-11 00:00:00'::timestamp without time zone))
11. 0.049 0.049 ↑ 196.0 1 28,190

Index Scan using idx_measurement_files_measurement_id on measurement_files (cost=0.56..37.22 rows=196 width=4) (actual time=0.049..0.049 rows=1 loops=28,190)

  • Index Cond: (measurement_id = measurements.measurement_id)
  • Filter: (mount_point_id = ANY ('{1,2,3,4,5,6,7,8,9,10}'::integer[]))
12. 0.005 0.349 ↑ 75.0 1 28,190

Nested Loop (cost=1.14..2,177.22 rows=75 width=4) (actual time=0.349..0.349 rows=1 loops=28,190)

13. 0.340 0.340 ↑ 98.0 2 28,190

Index Scan using idx_measurement_files_measurement_id on measurement_files measurement_files_1 (cost=0.56..28.91 rows=196 width=8) (actual time=0.002..0.340 rows=2 loops=28,190)

  • Index Cond: (measurement_id = measurement_files.measurement_id)
14. 0.004 0.004 ↓ 0.0 0 61,439

Index Scan using idx_process_data_measurement_file_id on process_data (cost=0.57..10.74 rows=22 width=4) (actual time=0.004..0.004 rows=0 loops=61,439)

  • Index Cond: (file_id = measurement_files_1.file_id)
  • Filter: ((item_value > '4'::double precision) AND (item_id = 1000))
  • Rows Removed by Filter: 1