explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XndI

Settings
# exclusive inclusive rows x rows loops node
1. 163,855.592 163,855.592 ↓ 6.4 646 1

CTE Scan on info_veh (cost=1,046.59..1,048.61 rows=101 width=20) (actual time=65.414..163,855.592 rows=646 loops=1)

2.          

CTE info_veh

3. 4.479 163,854.149 ↓ 6.4 646 1

Recursive Union (cost=1.04..1,046.59 rows=101 width=20) (actual time=65.412..163,854.149 rows=646 loops=1)

4. 0.005 65.414 ↑ 1.0 1 1

Limit (cost=1.04..3.12 rows=1 width=20) (actual time=65.410..65.414 rows=1 loops=1)

5. 0.002 65.409 ↑ 757,401.0 1 1

Merge Append (cost=1.04..1,579,146.86 rows=757,401 width=20) (actual time=65.409..65.409 rows=1 loops=1)

  • Sort Key: p.numero_embarque_pos, p.gmt_pos DESC
6. 0.009 0.015 ↓ 0.0 0 1

Sort (cost=0.01..0.02 rows=1 width=20) (actual time=0.014..0.015 rows=0 loops=1)

  • Sort Key: p.numero_embarque_pos, p.gmt_pos DESC
  • Sort Method: quicksort Memory: 25kB
7. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on position_geo_root p (cost=0.00..0.00 rows=1 width=20) (actual time=0.006..0.006 rows=0 loops=1)

  • Filter: ((gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone) AND ((code_exploitant_pos)::text = '3F3'::text))
8. 65.320 65.320 ↑ 3,441.0 1 1

Index Scan using idx_position_geo_2020t1m1_code_num_gmt on position_geo_2020t1m1 p_1 (cost=0.57..267,166.26 rows=3,441 width=20) (actual time=65.320..65.320 rows=1 loops=1)

  • Index Cond: (((code_exploitant_pos)::text = '3F3'::text) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
9. 0.072 0.072 ↑ 753,959.0 1 1

Index Scan using idx_position_geo_2020t1m2_code_num_gmt on position_geo_2020t1m2 p_2 (cost=0.43..1,302,191.29 rows=753,959 width=20) (actual time=0.072..0.072 rows=1 loops=1)

  • Index Cond: (((code_exploitant_pos)::text = '3F3'::text) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
10. 13.596 163,784.256 ↑ 10.0 1 646

WorkTable Scan on info_veh info_veh_1 (cost=0.00..104.14 rows=10 width=20) (actual time=253.535..253.536 rows=1 loops=646)

  • Filter: (numero_embarque_pos IS NOT NULL)
  • Rows Removed by Filter: 0
11.          

SubPlan (for WorkTable Scan)

12. 2.580 50,821.485 ↑ 1.0 1 645

Limit (cost=1.04..3.17 rows=1 width=24) (actual time=78.790..78.793 rows=1 loops=645)

13. 9.675 50,818.905 ↑ 252,468.0 1 645

Merge Append (cost=1.04..539,734.48 rows=252,468 width=24) (actual time=78.789..78.789 rows=1 loops=645)

  • Sort Key: position_geo_root.numero_embarque_pos, position_geo_root.gmt_pos DESC
14. 10.320 10.965 ↓ 0.0 0 645

Sort (cost=0.01..0.02 rows=1 width=36) (actual time=0.017..0.017 rows=0 loops=645)

  • Sort Key: position_geo_root.numero_embarque_pos, position_geo_root.gmt_pos DESC
  • Sort Method: quicksort Memory: 25kB
15. 0.645 0.645 ↓ 0.0 0 645

Seq Scan on position_geo_root (cost=0.00..0.00 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=645)

  • Filter: ((gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND ((code_exploitant_pos)::text = '3F3'::text))
16. 50,711.835 50,711.835 ↑ 1,147.0 1 645

Index Scan using idx_position_geo_2020t1m1_code_num_gmt on position_geo_2020t1m1 (cost=0.57..97,658.95 rows=1,147 width=24) (actual time=78.623..78.623 rows=1 loops=645)

  • Index Cond: (((code_exploitant_pos)::text = '3F3'::text) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
17. 86.430 86.430 ↑ 251,320.0 1 645

Index Scan using idx_position_geo_2020t1m2_code_num_gmt on position_geo_2020t1m2 (cost=0.43..438,812.39 rows=251,320 width=24) (actual time=0.134..0.134 rows=1 loops=645)

  • Index Cond: (((code_exploitant_pos)::text = '3F3'::text) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
18. 3.225 56,418.150 ↑ 1.0 1 645

Result (cost=2.47..2.48 rows=1 width=4) (actual time=87.470..87.470 rows=1 loops=645)

19.          

Initplan (for Result)

20. 3.225 56,414.925 ↑ 1.0 1 645

Limit (cost=1.04..2.47 rows=1 width=4) (actual time=87.462..87.465 rows=1 loops=645)

21. 9.675 56,411.700 ↑ 252,468.0 1 645

Merge Append (cost=1.04..363,145.28 rows=252,468 width=4) (actual time=87.460..87.460 rows=1 loops=645)

  • Sort Key: position_geo_root_1.numero_embarque_pos
22. 10.320 10.965 ↓ 0.0 0 645

Sort (cost=0.01..0.02 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=645)

  • Sort Key: position_geo_root_1.numero_embarque_pos
  • Sort Method: quicksort Memory: 25kB
23. 0.645 0.645 ↓ 0.0 0 645

Seq Scan on position_geo_root position_geo_root_1 (cost=0.00..0.00 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=645)

  • Filter: ((numero_embarque_pos IS NOT NULL) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND ((code_exploitant_pos)::text = '3F3'::text))
24. 56,351.070 56,351.070 ↑ 1,147.0 1 645

Index Only Scan using idx_position_geo_2020t1m1_code_num_gmt on position_geo_2020t1m1 position_geo_2020t1m1_1 (cost=0.57..103,968.11 rows=1,147 width=4) (actual time=87.366..87.366 rows=1 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos IS NOT NULL) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 0
25. 39.990 39.990 ↑ 251,320.0 1 645

Index Only Scan using idx_position_geo_2020t1m2_code_num_gmt on position_geo_2020t1m2 position_geo_2020t1m2_1 (cost=0.43..255,914.04 rows=251,320 width=4) (actual time=0.062..0.062 rows=1 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos IS NOT NULL) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 570
26. 0.000 56,531.025 ↑ 1.0 1 645

Result (cost=4.73..4.74 rows=1 width=8) (actual time=87.644..87.645 rows=1 loops=645)

27.          

Initplan (for Result)

28. 10.965 56,477.490 ↑ 1.0 1 645

Result (cost=2.47..2.48 rows=1 width=4) (actual time=87.562..87.562 rows=1 loops=645)

29.          

Initplan (for Result)

30. 2.580 56,466.525 ↑ 1.0 1 645

Limit (cost=1.04..2.47 rows=1 width=4) (actual time=87.542..87.545 rows=1 loops=645)

31. 9.030 56,463.945 ↑ 252,468.0 1 645

Merge Append (cost=1.04..363,145.28 rows=252,468 width=4) (actual time=87.541..87.541 rows=1 loops=645)

  • Sort Key: position_geo_root_2.numero_embarque_pos
32. 3.870 4.515 ↓ 0.0 0 645

Sort (cost=0.01..0.02 rows=1 width=4) (actual time=0.006..0.007 rows=0 loops=645)

  • Sort Key: position_geo_root_2.numero_embarque_pos
  • Sort Method: quicksort Memory: 25kB
33. 0.645 0.645 ↓ 0.0 0 645

Seq Scan on position_geo_root position_geo_root_2 (cost=0.00..0.00 rows=1 width=4) (actual time=0.000..0.001 rows=0 loops=645)

  • Filter: ((numero_embarque_pos IS NOT NULL) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND ((code_exploitant_pos)::text = '3F3'::text))
34. 56,414.925 56,414.925 ↑ 1,147.0 1 645

Index Only Scan using idx_position_geo_2020t1m1_code_num_gmt on position_geo_2020t1m1 position_geo_2020t1m1_2 (cost=0.57..103,968.11 rows=1,147 width=4) (actual time=87.465..87.465 rows=1 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos IS NOT NULL) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 0
35. 35.475 35.475 ↑ 251,320.0 1 645

Index Only Scan using idx_position_geo_2020t1m2_code_num_gmt on position_geo_2020t1m2 position_geo_2020t1m2_2 (cost=0.43..255,914.04 rows=251,320 width=4) (actual time=0.055..0.055 rows=1 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos IS NOT NULL) AND (numero_embarque_pos > info_veh_1.numero_embarque_pos) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 570
36. 1.935 56,528.445 ↑ 1.0 1 645

Limit (cost=1.04..2.24 rows=1 width=8) (actual time=87.639..87.641 rows=1 loops=645)

37. 56,486.520 56,526.510 ↑ 407.0 1 645

Merge Append (cost=1.04..491.38 rows=407 width=8) (actual time=87.638..87.638 rows=1 loops=645)

  • Sort Key: position_geo_root_3.gmt_pos DESC
38. 10.320 10.965 ↓ 0.0 0 645

Sort (cost=0.01..0.02 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=645)

  • Sort Key: position_geo_root_3.gmt_pos DESC
  • Sort Method: quicksort Memory: 25kB
39. 0.645 0.645 ↓ 0.0 0 645

Seq Scan on position_geo_root position_geo_root_3 (cost=0.00..0.00 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=645)

  • Filter: ((gmt_pos IS NOT NULL) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone) AND ((code_exploitant_pos)::text = '3F3'::text) AND (numero_embarque_pos = $6))
40. 12.900 12.900 ↓ 0.0 0 645

Index Only Scan using idx_position_geo_2020t1m1_code_num_gmt on position_geo_2020t1m1 position_geo_2020t1m1_3 (cost=0.57..4.62 rows=2 width=8) (actual time=0.020..0.020 rows=0 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos = $6) AND (gmt_pos IS NOT NULL) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 0
41. 16.125 16.125 ↑ 404.0 1 645

Index Only Scan using idx_position_geo_2020t1m2_code_num_gmt on position_geo_2020t1m2 position_geo_2020t1m2_3 (cost=0.43..481.46 rows=404 width=8) (actual time=0.025..0.025 rows=1 loops=645)

  • Index Cond: ((code_exploitant_pos = '3F3'::text) AND (numero_embarque_pos = $6) AND (gmt_pos IS NOT NULL) AND (gmt_pos >= '2020-01-31 23:00:00'::timestamp without time zone) AND (gmt_pos <= '2020-02-04 08:59:12'::timestamp without time zone))
  • Heap Fetches: 570
Planning time : 17.980 ms
Execution time : 163,856.386 ms