explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lu7Ys

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 1,247.946 ↑ 10.0 1 1

Nested Loop (cost=21,226.01..23,159.06 rows=10 width=1,693) (actual time=1,170.654..1,247.946 rows=1 loops=1)

  • Planning time: 4.489 ms
  • Execution time: 1248.556 ms
2. 0.005 1,247.917 ↑ 10.0 1 1

Nested Loop (cost=21,225.74..23,112.45 rows=10 width=1,168) (actual time=1,170.627..1,247.917 rows=1 loops=1)

3. 0.005 0.029 ↑ 1.0 1 1

Nested Loop (cost=4.71..12.74 rows=1 width=19) (actual time=0.024..0.029 rows=1 loops=1)

4. 0.014 0.014 ↑ 1.0 1 1

Index Only Scan using rel_hrut_veh_pkey on rel_hrut_veh rhv (cost=0.42..4.44 rows=1 width=8) (actual time=0.011..0.014 rows=1 loops=1)

  • Index Cond: (id_hrut = 59139)
  • Heap Fetches: 0
5. 0.006 0.010 ↑ 1.0 1 1

Bitmap Heap Scan on vehiculo veh (cost=4.28..8.30 rows=1 width=11) (actual time=0.009..0.010 rows=1 loops=1)

  • Recheck Cond: (id = rhv.id_veh)
  • Heap Blocks: exact=1
6. 0.004 0.004 ↑ 1.0 1 1

Bitmap Index Scan on vehiculo_pkey (cost=0.00..4.28 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id = rhv.id_veh)
7. 40.522 1,247.883 ↑ 10.0 1 1

Hash Join (cost=21,221.03..23,099.61 rows=10 width=1,153) (actual time=1,170.599..1,247.883 rows=1 loops=1)

  • Hash Cond: (rhc.id_car = c.id_car)
8. 36.879 36.879 ↓ 1.0 93,480 1

Seq Scan on rel_hrut_car rhc (cost=0.00..1,528.72 rows=93,272 width=24) (actual time=0.005..36.879 rows=93,480 loops=1)

9. 0.000 1,170.482 ↑ 9.0 1 1

Hash (cost=21,220.92..21,220.92 rows=9 width=1,137) (actual time=1,170.481..1,170.482 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 15.420 1,170.561 ↑ 9.0 1 1

Gather (cost=17,914.72..21,220.92 rows=9 width=1,137) (actual time=738.824..1,170.561 rows=1 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
11. 0.000 1,155.141 ↓ 0.0 0 2

Nested Loop Left Join (cost=16,914.72..20,220.02 rows=5 width=1,137) (actual time=940.710..1,155.141 rows=0 loops=2)

12. 0.000 1,155.129 ↓ 0.0 0 2

Nested Loop Left Join (cost=16,914.43..20,190.57 rows=5 width=1,117) (actual time=940.698..1,155.129 rows=0 loops=2)

13. 28.040 1,154.886 ↓ 0.0 0 2

Hash Join (cost=16,790.63..20,043.41 rows=5 width=1,105) (actual time=940.555..1,154.886 rows=0 loops=2)

  • Hash Cond: (c.id_car = rh.id_car)
14. 59.848 1,126.816 ↓ 1.0 51,625 2

Hash Left Join (cost=16,763.97..19,503.82 rows=51,288 width=1,089) (actual time=721.944..1,126.816 rows=51,625 loops=2)

  • Hash Cond: (suc.id_direccion = dir.id)
15. 60.367 918.699 ↓ 1.0 51,625 2

Hash Left Join (cost=12,631.11..15,236.33 rows=51,288 width=1,062) (actual time=573.298..918.699 rows=51,625 loops=2)

  • Hash Cond: (c.id_suc = suc.id)
16. 62.249 508.638 ↓ 1.0 51,625 2

Hash Join (cost=5,712.61..8,183.19 rows=51,288 width=1,057) (actual time=222.473..508.638 rows=51,625 loops=2)

  • Hash Cond: (c.id_est = ec.id_estcar)
17. 66.919 446.360 ↓ 1.0 51,625 2

Hash Join (cost=5,711.31..8,003.38 rows=51,288 width=1,037) (actual time=222.424..446.360 rows=51,625 loops=2)

  • Hash Cond: (c.id_dir = d.id)
18. 62.212 217.431 ↓ 1.0 51,625 2

Hash Join (cost=1,578.45..3,735.88 rows=51,288 width=972) (actual time=59.848..217.431 rows=51,625 loops=2)

  • Hash Cond: (c.id_per = p.id)
19. 55.859 95.698 ↓ 1.0 51,625 2

Hash Left Join (cost=14.09..2,036.88 rows=51,288 width=919) (actual time=0.036..95.698 rows=51,625 loops=2)

  • Hash Cond: (c.id_car = j.id_car)
20. 39.829 39.829 ↓ 1.0 51,625 2

Parallel Seq Scan on carga c (cost=0.00..1,829.88 rows=51,288 width=153) (actual time=0.009..39.829 rows=51,625 loops=2)

21. 0.001 0.010 ↓ 0.0 0 2

Hash (cost=12.84..12.84 rows=100 width=774) (actual time=0.010..0.010 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
22. 0.001 0.009 ↓ 0.0 0 2

Hash Left Join (cost=1.56..12.84 rows=100 width=774) (actual time=0.009..0.009 rows=0 loops=2)

  • Hash Cond: (j.id_motiv = m.id_mot)
23. 0.008 0.008 ↓ 0.0 0 2

Seq Scan on justificacion j (cost=0.00..11.00 rows=100 width=754) (actual time=0.008..0.008 rows=0 loops=2)

24. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.25..1.25 rows=25 width=24) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on motivo_negativo m (cost=0.00..1.25 rows=25 width=24) (never executed)

26. 31.613 59.521 ↓ 1.0 43,830 2

Hash (cost=1,019.16..1,019.16 rows=43,616 width=57) (actual time=59.520..59.521 rows=43,830 loops=2)

  • Buckets: 65536 Batches: 1 Memory Usage: 3779kB
27. 27.908 27.908 ↓ 1.0 43,830 2

Seq Scan on persona p (cost=0.00..1,019.16 rows=43,616 width=57) (actual time=0.008..27.908 rows=43,830 loops=2)

28. 87.919 162.010 ↓ 1.0 118,088 2

Hash (cost=2,666.83..2,666.83 rows=117,283 width=73) (actual time=162.009..162.010 rows=118,088 loops=2)

  • Buckets: 131072 Batches: 1 Memory Usage: 11746kB
29. 74.091 74.091 ↓ 1.0 118,088 2

Seq Scan on direccion d (cost=0.00..2,666.83 rows=117,283 width=73) (actual time=0.018..74.091 rows=118,088 loops=2)

30. 0.011 0.029 ↑ 1.0 13 2

Hash (cost=1.13..1.13 rows=13 width=28) (actual time=0.028..0.029 rows=13 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
31. 0.018 0.018 ↑ 1.0 13 2

Seq Scan on estado_carga ec (cost=0.00..1.13 rows=13 width=28) (actual time=0.010..0.018 rows=13 loops=2)

32. 187.909 349.694 ↓ 1.3 286,998 2

Hash (cost=4,136.00..4,136.00 rows=222,600 width=9) (actual time=349.693..349.694 rows=286,998 loops=2)

  • Buckets: 524288 (originally 262144) Batches: 1 (originally 1) Memory Usage: 16501kB
33. 161.785 161.785 ↓ 1.3 286,998 2

Seq Scan on sucursal suc (cost=0.00..4,136.00 rows=222,600 width=9) (actual time=0.013..161.785 rows=286,998 loops=2)

34. 78.463 148.269 ↓ 1.0 118,088 2

Hash (cost=2,666.83..2,666.83 rows=117,283 width=35) (actual time=148.269..148.269 rows=118,088 loops=2)

  • Buckets: 131072 Batches: 1 Memory Usage: 8925kB
35. 69.806 69.806 ↓ 1.0 118,088 2

Seq Scan on direccion dir (cost=0.00..2,666.83 rows=117,283 width=35) (actual time=0.009..69.806 rows=118,088 loops=2)

36. 0.004 0.030 ↑ 9.0 1 2

Hash (cost=26.55..26.55 rows=9 width=16) (actual time=0.030..0.030 rows=1 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.026 0.026 ↑ 9.0 1 2

Index Scan using idx_rel_hrut_car_id_hrut on rel_hrut_car rh (cost=0.29..26.55 rows=9 width=16) (actual time=0.025..0.026 rows=1 loops=2)

  • Index Cond: (id_hrut = 59139)
38. 0.124 0.477 ↑ 1.0 1 1

Hash Right Join (cost=123.80..128.46 rows=1 width=20) (actual time=0.278..0.477 rows=1 loops=1)

  • Hash Cond: (con.id_con = rhc_1.id_con)
39. 0.103 0.103 ↑ 1.0 210 1

Seq Scan on conductor con (cost=0.00..4.10 rows=210 width=12) (actual time=0.008..0.103 rows=210 loops=1)

40. 0.007 0.250 ↑ 1.0 1 1

Hash (cost=123.79..123.79 rows=1 width=12) (actual time=0.249..0.250 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
41. 0.243 0.243 ↑ 1.0 1 1

Index Only Scan using rel_hrut_con_un on rel_hrut_con rhc_1 (cost=0.29..123.79 rows=1 width=12) (actual time=0.018..0.243 rows=1 loops=1)

  • Index Cond: ((id_hrut = rh.id_hrut) AND (id_hrut = 59139))
  • Heap Fetches: 0
42. 0.018 0.018 ↑ 1.0 1 1

Index Scan using persona_pkey on persona per (cost=0.29..5.89 rows=1 width=32) (actual time=0.018..0.018 rows=1 loops=1)

  • Index Cond: (id = con.id_per)
43. 0.019 0.019 ↑ 1.0 1 1

Index Scan using vehiculo_pkey on vehiculo v (cost=0.28..4.64 rows=1 width=12) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (id = veh.id)