explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kA0w : posicao

Settings
# exclusive inclusive rows x rows loops node
1. 1.139 8,394.496 ↑ 2.4 1,349 1

Sort (cost=274,138.08..274,146.32 rows=3,298 width=634) (actual time=8,394.306..8,394.496 rows=1,349 loops=1)

  • Sort Key: p.data
  • Sort Method: quicksort Memory: 300kB
2. 0.506 8,393.357 ↑ 2.4 1,349 1

Hash Left Join (cost=8,918.25..273,945.35 rows=3,298 width=634) (actual time=1,003.244..8,393.357 rows=1,349 loops=1)

  • Hash Cond: (eve.tipoevento_id = te.id)
3. 714.390 8,392.475 ↑ 2.4 1,349 1

Hash Right Join (cost=8,890.05..273,871.80 rows=3,298 width=599) (actual time=1,002.819..8,392.475 rows=1,349 loops=1)

  • Hash Cond: (eve.posicao_id = p.id)
4. 6,770.664 6,770.664 ↓ 1.0 6,636,952 1

Seq Scan on eventoviagem eve (cost=0.00..240,518.37 rows=6,523,537 width=16) (actual time=0.422..6,770.664 rows=6,636,952 loops=1)

5. 1.400 907.421 ↓ 1.4 1,349 1

Hash (cost=8,877.80..8,877.80 rows=980 width=591) (actual time=907.421..907.421 rows=1,349 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 170kB
6. 1.628 906.021 ↓ 1.4 1,349 1

Hash Left Join (cost=6.41..8,877.80 rows=980 width=591) (actual time=1.035..906.021 rows=1,349 loops=1)

  • Hash Cond: (p.rastreador_id = rastreador.id)
7. 3.983 904.371 ↓ 1.4 1,349 1

Nested Loop (cost=4.99..8,863.48 rows=980 width=83) (actual time=0.999..904.371 rows=1,349 loops=1)

8. 1.954 1.954 ↓ 1.4 1,349 1

Index Scan using idx_viagem_posicao_viagem_id on viagem_posicao vp (cost=0.42..452.38 rows=980 width=8) (actual time=0.063..1.954 rows=1,349 loops=1)

  • Index Cond: (viagem_id = 1310351)
9. 886.293 898.434 ↑ 1.0 1 1,349

Bitmap Heap Scan on posicao p (cost=4.56..8.57 rows=1 width=83) (actual time=0.666..0.666 rows=1 loops=1,349)

  • Recheck Cond: (id = vp.posicao_id)
  • Heap Blocks: exact=1349
10. 12.141 12.141 ↑ 1.0 1 1,349

Bitmap Index Scan on posicao_pkey (cost=0.00..4.56 rows=1 width=0) (actual time=0.009..0.009 rows=1 loops=1,349)

  • Index Cond: (id = vp.posicao_id)
11. 0.008 0.022 ↓ 1.1 20 1

Hash (cost=1.19..1.19 rows=19 width=524) (actual time=0.022..0.022 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 0.014 0.014 ↓ 1.1 20 1

Seq Scan on rastreador (cost=0.00..1.19 rows=19 width=524) (actual time=0.010..0.014 rows=20 loops=1)

13. 0.153 0.376 ↓ 1.0 721 1

Hash (cost=19.20..19.20 rows=720 width=43) (actual time=0.376..0.376 rows=721 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 64kB
14. 0.223 0.223 ↓ 1.0 721 1

Seq Scan on tipoevento te (cost=0.00..19.20 rows=720 width=43) (actual time=0.012..0.223 rows=721 loops=1)

Planning time : 0.933 ms
Execution time : 8,394.790 ms