explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wus5

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 2,955.810 ↓ 2.0 10 1

Limit (cost=9,356.21..9,356.23 rows=5 width=2,420) (actual time=2,955.777..2,955.810 rows=10 loops=1)

2. 1.861 2,955.776 ↓ 2.0 10 1

Sort (cost=9,356.21..9,356.23 rows=5 width=2,420) (actual time=2,955.774..2,955.776 rows=10 loops=1)

  • Sort Key: processopa0_.id_processo_parte_expediente DESC, processoex1_.dt_criacao_expediente DESC
  • Sort Method: top-N heapsort Memory: 33kB
3. 1.240 2,953.915 ↓ 102.2 511 1

Nested Loop Left Join (cost=6,184.67..9,356.16 rows=5 width=2,420) (actual time=1,550.689..2,953.915 rows=511 loops=1)

4. 0.904 2,882.668 ↓ 102.2 511 1

Nested Loop Left Join (cost=6,184.25..9,353.03 rows=5 width=1,861) (actual time=1,548.131..2,882.668 rows=511 loops=1)

5. 0.885 2,821.466 ↓ 102.2 511 1

Nested Loop Left Join (cost=6,183.84..9,350.63 rows=5 width=1,793) (actual time=1,532.501..2,821.466 rows=511 loops=1)

6. 1.525 2,779.701 ↓ 102.2 511 1

Nested Loop Left Join (cost=6,183.42..9,334.61 rows=5 width=1,780) (actual time=1,522.553..2,779.701 rows=511 loops=1)

7. 1.616 2,778.176 ↓ 102.2 511 1

Nested Loop (cost=6,183.27..9,333.77 rows=5 width=1,742) (actual time=1,522.498..2,778.176 rows=511 loops=1)

8. 0.905 1,521.544 ↑ 1.8 511 1

Hash Left Join (cost=6,182.85..7,867.37 rows=934 width=1,742) (actual time=1,484.468..1,521.544 rows=511 loops=1)

  • Hash Cond: ((tipodocume6_.id_tipo_processo_documento)::integer = (tipodocume6_1_.id_tipo_processo_documento_trf)::integer)
9. 1.143 1,514.662 ↑ 1.8 511 1

Hash Left Join (cost=6,155.30..7,837.36 rows=934 width=1,738) (actual time=1,478.395..1,514.662 rows=511 loops=1)

  • Hash Cond: ((processoex1_.id_tipo_processo_documento)::integer = (tipodocume6_.id_tipo_processo_documento)::integer)
10. 1.122 1,499.044 ↑ 1.8 511 1

Hash Left Join (cost=6,141.25..7,820.80 rows=934 width=1,419) (actual time=1,463.848..1,499.044 rows=511 loops=1)

  • Hash Cond: (oficialare4_.id_pessoa_oficial_justica = (pessoafisi5_.id_pessoa_fisica)::integer)
11. 0.702 977.197 ↑ 1.8 511 1

Hash Left Join (cost=4,212.85..5,889.95 rows=934 width=400) (actual time=942.849..977.197 rows=511 loops=1)

  • Hash Cond: (posseexped3_.id_oficial_area = oficialare4_.id_oficial_area)
12. 18.180 970.957 ↑ 1.8 511 1

Hash Right Join (cost=4,180.35..5,854.99 rows=934 width=392) (actual time=937.176..970.957 rows=511 loops=1)

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

Seq Scan on tb_posse_expediente posseexped3_ (cost=0.00..1,427.40 rows=63,440 width=20) (actual time=21.620..101.714 rows=64,186 loops=1)

14. 1.692 851.063 ↑ 1.4 511 1

Hash (cost=4,171.59..4,171.59 rows=701 width=372) (actual time=851.063..851.063 rows=511 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 88kB
15. 1.293 849.371 ↑ 1.4 511 1

Nested Loop Left Join (cost=24.56..4,171.59 rows=701 width=372) (actual time=89.224..849.371 rows=511 loops=1)

16. 1.979 776.027 ↑ 1.4 511 1

Nested Loop (cost=24.27..3,952.89 rows=701 width=340) (actual time=88.052..776.027 rows=511 loops=1)

17. 3.267 48.428 ↑ 1.4 511 1

Bitmap Heap Scan on tb_proc_parte_expediente processopa0_ (cost=23.85..1,212.20 rows=701 width=240) (actual time=45.254..48.428 rows=511 loops=1)

  • Recheck Cond: ((id_processo_trf)::integer = 66168)
  • Heap Blocks: exact=95
18. 45.161 45.161 ↑ 1.4 511 1

Bitmap Index Scan on tb_proc_parte_expediente_in05 (cost=0.00..23.68 rows=701 width=0) (actual time=45.161..45.161 rows=511 loops=1)

  • Index Cond: ((id_processo_trf)::integer = 66168)
19. 725.620 725.620 ↑ 1.0 1 511

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

  • Index Cond: ((id_processo_expediente)::integer = (processopa0_.id_processo_expediente)::integer)
20. 72.051 72.051 ↓ 0.0 0 511

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

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

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

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

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

23. 200.751 520.725 ↓ 12.7 148,142 1

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

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

Seq Scan on tb_pessoa_fisica pessoafisi5_ (cost=0.00..1,782.62 rows=11,662 width=1,019) (actual time=18.476..319.974 rows=148,142 loops=1)

25. 0.612 14.475 ↓ 3.6 656 1

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

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

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

27. 0.249 5.977 ↑ 1.2 656 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
28. 5.728 5.728 ↑ 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=5.492..5.728 rows=656 loops=1)

29. 1,255.016 1,255.016 ↑ 1.0 1 511

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

  • Index Cond: ((id_processo_documento)::integer = processoex1_.id_processo_documento)
  • Filter: ((in_ativo)::bpchar = 'S'::bpchar)
30. 0.000 0.000 ↓ 0.0 0 511

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.000..0.000 rows=0 loops=511)

  • Index Cond: (processoex1_.id_tipo_meio_comunicacao = id_tipo_meio_comunicacao)
31. 40.880 40.880 ↓ 0.0 0 511

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

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

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

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

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.137..0.137 rows=0 loops=511)

  • Index Cond: ((usuario9_.id_usuario)::integer = id_usuario)
Planning time : 1,766.453 ms
Execution time : 2,958.664 ms