explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uvyR

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

Aggregate (cost=360.10..360.11 rows=1 width=8) (actual time=75.803..75.803 rows=1 loops=1)

2.          

CTE differences

3. 0.000 75.792 ↑ 1.0 5 1

Limit (cost=1.70..359.98 rows=5 width=12) (actual time=75.667..75.792 rows=5 loops=1)

4.          

Initplan (for Limit)

5. 0.029 0.029 ↑ 1.0 1 1

Limit (cost=0.00..1.64 rows=1 width=12) (actual time=0.029..0.029 rows=1 loops=1)

  • -> Index Scan using __gcapp107239_gps_path_g_device_id_start_t_visibility_idx on __gcapp107239_gps_path (cost=0.00..16.42 rows=10 width=12) (actual time=0.029..0.029 rows=1 l
  • Index Cond: ((g_device_id = 860) AND (start_t <= 1,602,799,559::bigint) AND (start_t >= 1,601,935,559) AND (visibility = 1))
6. 0.088 75.790 ↑ 34.6 5 1

Nested Loop (cost=0.06..12,396.69 rows=173 width=12) (actual time=75.666..75.790 rows=5 loops=1)

  • Join Filter: (d.id = e.gps_data_id)
7. 0.005 75.617 ↑ 3.4 5 1

Merge Append (cost=0.06..11,983.33 rows=17 width=12) (actual time=75.589..75.617 rows=5 loops=1)

  • Sort Key: d."timestamp
8. 10.517 10.517 ↑ 2.4 5 1

Index Scan Backward using __gcapp107239_gps_data_timestamp_index on __gcapp107239_gps_data d (cost=0.00..3,683.45 rows=12 width=12) (actual time=10.492..10.517 rows=5 loops=1)

  • Index Cond: (("timestamp" <= 1,602,799,559::bigint) AND ("timestamp" >= 1,601,935,559))
  • Filter: ((g_device_id = 860) AND (path = $0))
9. 0.006 0.006 ↓ 0.0 0 1

Index Scan Backward using u_2019q3__gcapp107239_gps_data_timestamp_index on __gcapp107239_gps_data_unpartitioned_2019_q3 d (cost=0.00..2.56 rows=1 width=12) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: (("timestamp" <= 1,602,799,559::bigint) AND ("timestamp" >= 1,601,935,559))
  • Filter: ((g_device_id = 860) AND (path = $0))
10. 0.004 0.004 ↓ 0.0 0 1

Index Scan Backward using u_2020q1__gcapp107239_gps_data_timestamp_index on __gcapp107239_gps_data_unpartitioned_2020_q1 d (cost=0.00..2.57 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (("timestamp" <= 1,602,799,559::bigint) AND ("timestamp" >= 1,601,935,559))
  • Filter: ((g_device_id = 860) AND (path = $0))
11. 0.004 0.004 ↓ 0.0 0 1

Index Scan Backward using u_2020q2__gcapp107239_gps_data_timestamp_index on __gcapp107239_gps_data_unpartitioned_2020_q2 d (cost=0.00..2.58 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (("timestamp" <= 1,602,799,559::bigint) AND ("timestamp" >= 1,601,935,559))
  • Filter: ((g_device_id = 860) AND (path = $0))
12. 65.081 65.081 ↓ 0.0 0 1

Index Scan Backward using u___gcapp107239_gps_data_timestamp_index on __gcapp107239_gps_data_unpartitioned d (cost=0.00..8,291.69 rows=2 width=12) (actual time=65.081..65.081 rows=0 loops=1)

  • Index Cond: (("timestamp" <= 1,602,799,559::bigint) AND ("timestamp" >= 1,601,935,559))
  • Filter: ((g_device_id = 860) AND (path = $0))
13. 0.031 0.085 ↑ 11.0 1 5

Append (cost=0.00..22.04 rows=11 width=8) (actual time=0.006..0.017 rows=1 loops=5)

14. 0.030 0.030 ↑ 1.0 1 5

Index Scan using __gcapp107239_gps_data_extra_gps_data_id_type_property_index on __gcapp107239_gps_data_extra e (cost=0.00..2.60 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=5)

  • Index Cond: ((gps_data_id = d.id) AND (property = 9))
  • Filter: (value <> 0)
15. 0.012 0.012 ↓ 0.0 0 4

Index Scan using u_2019q3__gcapp107239_gps_data_extra_gps_data_id_index on __gcapp107239_gps_data_extra_unpartitioned_2019_q3 e (cost=0.00..4.54 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=4)

  • Index Cond: (gps_data_id = d.id)
  • Filter: ((value <> 0) AND (property = 9))
16. 0.012 0.012 ↓ 0.0 0 4

Index Scan using u_2020q1__gcapp107239_gps_data_extra_gps_data_id_index on __gcapp107239_gps_data_extra_unpartitioned_2020_q1 e (cost=0.00..5.44 rows=3 width=8) (actual time=0.003..0.003 rows=0 loops=4)