explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hDq6

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 32.613 ↑ 1.0 10 1

Limit (cost=506.89..506.91 rows=10 width=172) (actual time=32.602..32.613 rows=10 loops=1)

2. 1.089 32.600 ↑ 4.6 10 1

Sort (cost=506.89..507.00 rows=46 width=172) (actual time=32.598..32.600 rows=10 loops=1)

  • Sort Key: processopa0_.id_processo_parte_expediente DESC, processoex1_.dt_criacao_expediente DESC
  • Sort Method: top-N heapsort Memory: 26kB
3. 1.281 31.511 ↓ 32.2 1,480 1

Nested Loop (cost=4.99..505.90 rows=46 width=172) (actual time=0.176..31.511 rows=1,480 loops=1)

4. 1.192 24.310 ↓ 32.2 1,480 1

Nested Loop Left Join (cost=4.42..450.79 rows=46 width=176) (actual time=0.160..24.310 rows=1,480 loops=1)

5. 1.049 23.118 ↓ 32.2 1,480 1

Nested Loop Left Join (cost=3.99..426.97 rows=46 width=148) (actual time=0.147..23.118 rows=1,480 loops=1)

6. 1.172 22.069 ↓ 32.2 1,480 1

Nested Loop Left Join (cost=3.56..406.24 rows=46 width=148) (actual time=0.133..22.069 rows=1,480 loops=1)

7. 1.352 20.897 ↓ 32.2 1,480 1

Nested Loop Left Join (cost=3.13..293.77 rows=46 width=148) (actual time=0.113..20.897 rows=1,480 loops=1)

8. 0.818 19.545 ↓ 32.2 1,480 1

Nested Loop Left Join (cost=2.71..269.07 rows=46 width=120) (actual time=0.099..19.545 rows=1,480 loops=1)

9. 1.801 12.843 ↓ 47.5 1,471 1

Nested Loop Left Join (cost=1.15..178.91 rows=31 width=112) (actual time=0.049..12.843 rows=1,471 loops=1)

10. 0.996 8.100 ↓ 47.5 1,471 1

Nested Loop (cost=0.87..169.84 rows=31 width=87) (actual time=0.039..8.100 rows=1,471 loops=1)

11. 1.220 1.220 ↓ 47.5 1,471 1

Index Scan using tb_proc_parte_expediente_in05 on tb_proc_parte_expediente processopa0_ (cost=0.43..31.82 rows=31 width=69) (actual time=0.015..1.220 rows=1,471 loops=1)

  • Index Cond: ((id_processo_trf)::integer = 530764)
12. 5.884 5.884 ↑ 1.0 1 1,471

Index Scan using tb_processo_expediente_ak on tb_processo_expediente processoex1_ (cost=0.43..4.45 rows=1 width=22) (actual time=0.004..0.004 rows=1 loops=1,471)

  • Index Cond: ((id_processo_expediente)::integer = (processopa0_.id_processo_expediente)::integer)
13. 2.942 2.942 ↑ 1.0 1 1,471

Index Scan using tb_tipo_processo_documento_pk on tb_tipo_processo_documento tipodocume2_ (cost=0.28..0.29 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=1,471)

  • Index Cond: ((processoex1_.id_tipo_processo_documento)::integer = (id_tipo_processo_documento)::integer)
14. 0.000 5.884 ↓ 0.0 0 1,471

Nested Loop Left Join (cost=1.56..2.90 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=1,471)

15. 1.351 5.884 ↓ 0.0 0 1,471

Nested Loop Left Join (cost=1.14..1.27 rows=1 width=16) (actual time=0.003..0.004 rows=0 loops=1,471)

16. 0.000 4.413 ↓ 0.0 0 1,471

Nested Loop Left Join (cost=0.85..0.97 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=1,471)

17. 4.413 4.413 ↓ 0.0 0 1,471

Index Scan using tb_expediente_central_uk on tb_expediente_central expediente5_ (cost=0.42..0.44 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,471)

  • Index Cond: ((processoex1_.id_processo_expediente)::integer = id_processo_expediente)
18. 0.147 0.147 ↑ 2.0 1 21

Index Scan using tb_posse_expediente_in01 on tb_posse_expediente posseexped6_ (cost=0.43..0.51 rows=2 width=16) (actual time=0.006..0.007 rows=1 loops=21)

  • Index Cond: (expediente5_.id_expediente_central = id_expediente_central)
19. 0.120 0.120 ↑ 1.0 1 30

Index Scan using tb_oficial_area_pk on tb_oficial_area oficialare7_ (cost=0.28..0.30 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=30)

  • Index Cond: (posseexped6_.id_oficial_area = id_oficial_area)
20. 0.120 0.120 ↑ 1.0 1 30

Index Only Scan using tb_pessoa_fisica_pk on tb_pessoa_fisica pessoafisi8_ (cost=0.43..1.63 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=30)

  • Index Cond: (id_pessoa_fisica = oficialare7_.id_pessoa_oficial_justica)
  • Heap Fetches: 0
21. 0.000 0.000 ↓ 0.0 0 1,480

Index Scan using tb_usuario_login_pk on tb_usuario_login usuariolog9_ (cost=0.43..0.54 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=1,480)

  • Index Cond: ((pessoafisi8_.id_pessoa_fisica)::integer = id_usuario)
22. 0.000 0.000 ↓ 0.0 0 1,480

Index Only Scan using tb_pessoa_pk on tb_pessoa pessoa3_ (cost=0.43..2.45 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=1,480)

  • Index Cond: (id_pessoa = (processopa0_.id_pessoa_ciencia)::integer)
  • Heap Fetches: 0
23. 0.000 0.000 ↓ 0.0 0 1,480

Index Only Scan using tb_usuario_pk on tb_usuario usuario4_ (cost=0.43..0.45 rows=1 width=4) (actual time=0.000..0.000 rows=0 loops=1,480)

  • Index Cond: (id_usuario = (pessoa3_.id_pessoa)::integer)
  • Heap Fetches: 0
24. 0.000 0.000 ↓ 0.0 0 1,480

Index Scan using tb_usuario_login_pk on tb_usuario_login usuario4_1_ (cost=0.43..0.52 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=1,480)

  • Index Cond: ((usuario4_.id_usuario)::integer = id_usuario)
25. 5.920 5.920 ↑ 1.0 1 1,480

Index Scan using tb_processo_documento_pk on tb_processo_documento documento10_ (cost=0.57..1.20 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,480)

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