explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ghRE

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 420.549 ↓ 2.0 10 1

Limit (cost=9,362.37..9,362.38 rows=5 width=2,420) (actual time=420.523..420.549 rows=10 loops=1)

2. 0.117 420.522 ↓ 2.0 10 1

Sort (cost=9,362.37..9,362.38 rows=5 width=2,420) (actual time=420.520..420.522 rows=10 loops=1)

  • Sort Key: processopa0_.id_processo_parte_expediente DESC, processoex1_.dt_criacao_expediente DESC
  • Sort Method: quicksort Memory: 29kB
3. 0.047 420.405 ↓ 2.6 13 1

Nested Loop Left Join (cost=6,189.14..9,362.31 rows=5 width=2,420) (actual time=419.630..420.405 rows=13 loops=1)

4. 0.036 420.254 ↓ 2.6 13 1

Nested Loop Left Join (cost=6,188.72..9,359.19 rows=5 width=1,861) (actual time=419.609..420.254 rows=13 loops=1)

5. 0.046 420.140 ↓ 2.6 13 1

Nested Loop Left Join (cost=6,188.31..9,356.78 rows=5 width=1,793) (actual time=419.588..420.140 rows=13 loops=1)

6. 0.041 420.016 ↓ 2.6 13 1

Nested Loop Left Join (cost=6,187.89..9,340.76 rows=5 width=1,780) (actual time=419.562..420.016 rows=13 loops=1)

7. 0.055 419.923 ↓ 2.6 13 1

Nested Loop (cost=6,187.74..9,339.92 rows=5 width=1,742) (actual time=419.518..419.923 rows=13 loops=1)

8. 0.053 419.644 ↑ 66.8 14 1

Hash Left Join (cost=6,187.32..7,871.86 rows=935 width=1,742) (actual time=419.426..419.644 rows=14 loops=1)

  • Hash Cond: ((tipodocume6_.id_tipo_processo_documento)::integer = (tipodocume6_1_.id_tipo_processo_documento_trf)::integer)
9. 0.103 418.945 ↑ 66.8 14 1

Hash Left Join (cost=6,159.77..7,841.85 rows=935 width=1,738) (actual time=418.756..418.945 rows=14 loops=1)

  • Hash Cond: ((processoex1_.id_tipo_processo_documento)::integer = (tipodocume6_.id_tipo_processo_documento)::integer)
10. 0.103 417.306 ↑ 66.8 14 1

Hash Left Join (cost=6,145.72..7,825.29 rows=935 width=1,419) (actual time=417.155..417.306 rows=14 loops=1)

  • Hash Cond: (oficialare4_.id_pessoa_oficial_justica = (pessoafisi5_.id_pessoa_fisica)::integer)
11. 0.054 39.594 ↑ 66.8 14 1

Hash Left Join (cost=4,217.32..5,894.44 rows=935 width=400) (actual time=39.464..39.594 rows=14 loops=1)

  • Hash Cond: (posseexped3_.id_oficial_area = oficialare4_.id_oficial_area)
12. 20.322 39.278 ↑ 66.8 14 1

Hash Right Join (cost=4,184.82..5,859.47 rows=935 width=392) (actual time=39.170..39.278 rows=14 loops=1)

  • Hash Cond: (posseexped3_.id_expediente_central = expediente2_.id_expediente_central)
13. 18.503 18.503 ↓ 1.0 64,183 1

Seq Scan on tb_posse_expediente posseexped3_ (cost=0.00..1,427.40 rows=63,440 width=20) (actual time=0.024..18.503 rows=64,183 loops=1)

14. 0.046 0.453 ↑ 50.1 14 1

Hash (cost=4,176.05..4,176.05 rows=702 width=372) (actual time=0.453..0.453 rows=14 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
15. 0.027 0.407 ↑ 50.1 14 1

Nested Loop Left Join (cost=24.57..4,176.05 rows=702 width=372) (actual time=0.147..0.407 rows=14 loops=1)

16. 0.051 0.310 ↑ 50.1 14 1

Nested Loop (cost=24.28..3,957.03 rows=702 width=340) (actual time=0.126..0.310 rows=14 loops=1)

17. 0.035 0.091 ↑ 50.1 14 1

Bitmap Heap Scan on tb_proc_parte_expediente processopa0_ (cost=23.86..1,213.91 rows=702 width=240) (actual time=0.086..0.091 rows=14 loops=1)

  • Recheck Cond: ((id_processo_trf)::integer = 112947)
  • Heap Blocks: exact=1
18. 0.056 0.056 ↑ 50.1 14 1

Bitmap Index Scan on tb_proc_parte_expediente_in05 (cost=0.00..23.69 rows=702 width=0) (actual time=0.056..0.056 rows=14 loops=1)

  • Index Cond: ((id_processo_trf)::integer = 112947)
19. 0.168 0.168 ↑ 1.0 1 14

Index Scan using tb_processo_expediente_pk on tb_processo_expediente processoex1_ (cost=0.42..3.91 rows=1 width=100) (actual time=0.012..0.012 rows=1 loops=14)

  • Index Cond: ((id_processo_expediente)::integer = (processopa0_.id_processo_expediente)::integer)
20. 0.070 0.070 ↓ 0.0 0 14

Index Scan using tb_expediente_central_uk on tb_expediente_central expediente2_ (cost=0.29..0.31 rows=1 width=32) (actual time=0.005..0.005 rows=0 loops=14)

  • Index Cond: ((processoex1_.id_processo_expediente)::integer = id_processo_expediente)
21. 0.123 0.262 ↑ 4.2 240 1

Hash (cost=20.00..20.00 rows=1,000 width=8) (actual time=0.262..0.262 rows=240 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
22. 0.139 0.139 ↑ 4.2 240 1

Seq Scan on tb_oficial_area oficialare4_ (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.026..0.139 rows=240 loops=1)

23. 203.897 377.609 ↓ 12.7 148,135 1

Hash (cost=1,782.62..1,782.62 rows=11,662 width=1,019) (actual time=377.609..377.609 rows=148,135 loops=1)

  • Buckets: 262144 (originally 16384) Batches: 1 (originally 1) Memory Usage: 15429kB
24. 173.712 173.712 ↓ 12.7 148,135 1

Seq Scan on tb_pessoa_fisica pessoafisi5_ (cost=0.00..1,782.62 rows=11,662 width=1,019) (actual time=0.020..173.712 rows=148,135 loops=1)

25. 0.768 1.536 ↓ 3.6 656 1

Hash (cost=11.80..11.80 rows=180 width=319) (actual time=1.536..1.536 rows=656 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
26. 0.768 0.768 ↓ 3.6 656 1

Seq Scan on tb_tipo_processo_documento tipodocume6_ (cost=0.00..11.80 rows=180 width=319) (actual time=0.063..0.768 rows=656 loops=1)

27. 0.355 0.646 ↑ 1.2 656 1

Hash (cost=17.80..17.80 rows=780 width=8) (actual time=0.645..0.646 rows=656 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
28. 0.291 0.291 ↑ 1.2 656 1

Seq Scan on tb_tipo_proc_documento_trf tipodocume6_1_ (cost=0.00..17.80 rows=780 width=8) (actual time=0.026..0.291 rows=656 loops=1)

29. 0.224 0.224 ↑ 1.0 1 14

Index Scan using tb_processo_documento_pk on tb_processo_documento documento11_ (cost=0.42..1.57 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=14)

  • Index Cond: ((id_processo_documento)::integer = processoex1_.id_processo_documento)
  • Filter: ((in_ativo)::bpchar = 'S'::bpchar)
  • Rows Removed by Filter: 0
30. 0.052 0.052 ↓ 0.0 0 13

Index Scan using tb_tipo_meio_comunicacao_pk on tb_tipo_meio_comunicacao tipomeioco7_ (cost=0.15..0.17 rows=1 width=38) (actual time=0.004..0.004 rows=0 loops=13)

  • Index Cond: (processoex1_.id_tipo_meio_comunicacao = id_tipo_meio_comunicacao)
31. 0.078 0.078 ↓ 0.0 0 13

Index Scan using tb_pessoa_pk on tb_pessoa pessoa8_ (cost=0.41..3.20 rows=1 width=13) (actual time=0.006..0.006 rows=0 loops=13)

  • Index Cond: ((processopa0_.id_pessoa_ciencia)::integer = (id_pessoa)::integer)
32. 0.078 0.078 ↓ 0.0 0 13

Index Scan using tb_usuario_pk on tb_usuario usuario9_ (cost=0.41..0.48 rows=1 width=68) (actual time=0.006..0.006 rows=0 loops=13)

  • Index Cond: ((pessoa8_.id_pessoa)::integer = (id_usuario)::integer)
33. 0.104 0.104 ↓ 0.0 0 13

Index Scan using tb_usuario_login_pk on tb_usuario_login usuario9_1_ (cost=0.41..0.63 rows=1 width=563) (actual time=0.008..0.008 rows=0 loops=13)

  • Index Cond: ((usuario9_.id_usuario)::integer = id_usuario)