explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XuoQ

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

Limit (cost=13,944.92..13,944.94 rows=10 width=117) (actual time=9.197..9.201 rows=10 loops=1)

2. 0.397 9.196 ↑ 260.9 10 1

Sort (cost=13,944.92..13,951.44 rows=2,609 width=117) (actual time=9.195..9.196 rows=10 loops=1)

  • Sort Key: processopa0_.id_processo_parte_expediente DESC, processoex1_.dt_criacao_expediente DESC
  • Sort Method: top-N heapsort Memory: 28kB
3. 0.631 8.799 ↑ 2.5 1,035 1

Nested Loop (cost=20.35..13,888.54 rows=2,609 width=117) (actual time=0.296..8.799 rows=1,035 loops=1)

4. 0.489 6.098 ↑ 2.5 1,035 1

Nested Loop Left Join (cost=19.79..11,101.61 rows=2,619 width=121) (actual time=0.285..6.098 rows=1,035 loops=1)

5. 0.384 5.609 ↑ 1.7 1,034 1

Hash Left Join (cost=19.36..10,170.54 rows=1,765 width=117) (actual time=0.282..5.609 rows=1,034 loops=1)

  • Hash Cond: ((processoex1_.id_tipo_processo_documento)::integer = (tipodocume6_.id_tipo_processo_documento)::integer)
6. 0.772 4.981 ↑ 1.7 1,034 1

Nested Loop Left Join (cost=1.29..10,147.81 rows=1,765 width=113) (actual time=0.030..4.981 rows=1,034 loops=1)

7. 0.452 3.175 ↑ 1.7 1,034 1

Nested Loop (cost=0.87..9,363.95 rows=1,765 width=113) (actual time=0.023..3.175 rows=1,034 loops=1)

8. 0.655 0.655 ↑ 1.7 1,034 1

Index Scan using tb_proc_parte_expediente_in05 on tb_proc_parte_expediente processopa0_ (cost=0.43..1,641.29 rows=1,765 width=95) (actual time=0.013..0.655 rows=1,034 loops=1)

  • Index Cond: ((id_processo_trf)::integer = 570435)
9. 2.068 2.068 ↑ 1.0 1 1,034

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

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

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,034)

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

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

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

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

13. 0.000 0.000 ↓ 0.0 0 1,034

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,034)

  • Index Cond: (expediente2_.id_expediente_central = id_expediente_central)
14. 2.070 2.070 ↑ 1.0 1 1,035

Index Scan using tb_processo_documento_pk on tb_processo_documento pd (cost=0.57..1.06 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,035)

  • Index Cond: ((id_processo_documento)::integer = processoex1_.id_processo_documento)
  • Filter: ((in_ativo)::bpchar = 'S'::bpchar)