explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MfZb

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 331.137 ↑ 1.0 10 1

Limit (cost=8,395.59..8,441.57 rows=10 width=149) (actual time=331.013..331.137 rows=10 loops=1)

2. 0.064 331.132 ↑ 196.3 10 1

Result (cost=8,395.59..17,420.48 rows=1,963 width=149) (actual time=331.012..331.132 rows=10 loops=1)

3. 0.498 9.188 ↑ 196.3 10 1

Sort (cost=8,395.59..8,400.50 rows=1,963 width=121) (actual time=9.185..9.188 rows=10 loops=1)

  • Sort Key: processopa0_.id_processo_parte_expediente DESC, processoex1_.dt_criacao_expediente DESC
  • Sort Method: top-N heapsort Memory: 25kB
4. 0.648 8.690 ↑ 1.3 1,484 1

Nested Loop Left Join (cost=19.79..8,353.17 rows=1,963 width=121) (actual time=0.318..8.690 rows=1,484 loops=1)

5. 0.559 8.042 ↓ 1.1 1,483 1

Hash Left Join (cost=19.36..7,655.26 rows=1,323 width=117) (actual time=0.313..8.042 rows=1,483 loops=1)

  • Hash Cond: ((processoex1_.id_tipo_processo_documento)::integer = (tipodocume6_.id_tipo_processo_documento)::integer)
6. 1.103 7.229 ↓ 1.1 1,483 1

Nested Loop Left Join (cost=1.29..7,633.71 rows=1,323 width=113) (actual time=0.047..7.229 rows=1,483 loops=1)

7. 0.658 4.643 ↓ 1.1 1,483 1

Nested Loop (cost=0.87..7,046.14 rows=1,323 width=113) (actual time=0.036..4.643 rows=1,483 loops=1)

8. 1.019 1.019 ↓ 1.1 1,483 1

Index Scan using tb_proc_parte_expediente_in05 on tb_proc_parte_expediente processopa0_ (cost=0.43..1,231.49 rows=1,323 width=95) (actual time=0.021..1.019 rows=1,483 loops=1)

  • Index Cond: ((id_processo_trf)::integer = 303703)
9. 2.966 2.966 ↑ 1.0 1 1,483

Index Scan using tb_processo_expediente_ak on tb_processo_expediente processoex1_ (cost=0.43..4.40 rows=1 width=26) (actual time=0.002..0.002 rows=1 loops=1,483)

  • Index Cond: ((id_processo_expediente)::integer = (processopa0_.id_processo_expediente)::integer)
10. 1.483 1.483 ↓ 0.0 0 1,483

Index Scan using tb_expediente_central_uk on tb_expediente_central expediente2_ (cost=0.42..0.44 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1,483)

  • Index Cond: ((processoex1_.id_processo_expediente)::integer = id_processo_expediente)
11. 0.090 0.254 ↑ 1.0 625 1

Hash (cost=10.25..10.25 rows=625 width=12) (actual time=0.254..0.254 rows=625 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
12. 0.164 0.164 ↑ 1.0 625 1

Seq Scan on tb_tipo_processo_documento tipodocume6_ (cost=0.00..10.25 rows=625 width=12) (actual time=0.005..0.164 rows=625 loops=1)

13. 0.000 0.000 ↓ 0.0 0 1,483

Index Scan using tb_posse_expediente_in01 on tb_posse_expediente posseexped3_ (cost=0.43..0.51 rows=2 width=16) (actual time=0.000..0.000 rows=0 loops=1,483)

  • Index Cond: (expediente2_.id_expediente_central = id_expediente_central)
14.          

SubPlan (forResult)

15. 321.880 321.880 ↑ 1.0 1 10

Index Scan using tb_processo_documento_in04 on tb_processo_documento documento11_ (cost=0.57..4.58 rows=1 width=2) (actual time=32.187..32.188 rows=1 loops=10)

  • Index Cond: (processoex1_.id_processo_documento = (id_processo_documento)::integer)
Planning time : 1.216 ms
Execution time : 331.237 ms