explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mjDj

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 10,645.015 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,838.49..518,234.74 rows=1 width=1,528) (actual time=7,045.194..10,645.015 rows=1 loops=1)

  • Buffers: shared hit=600,800 read=124,899
2. 0.005 10,645.003 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,838.21..518,234.40 rows=1 width=1,477) (actual time=7,045.182..10,645.003 rows=1 loops=1)

  • Buffers: shared hit=600,800 read=124,899
3. 0.005 10,644.987 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,838.06..518,234.24 rows=1 width=1,455) (actual time=7,045.167..10,644.987 rows=1 loops=1)

  • Buffers: shared hit=600,798 read=124,899
4. 0.007 10,644.974 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,837.93..518,234.08 rows=1 width=1,439) (actual time=7,045.154..10,644.974 rows=1 loops=1)

  • Buffers: shared hit=600,796 read=124,899
5. 0.005 10,644.958 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,837.80..518,233.93 rows=1 width=1,425) (actual time=7,045.139..10,644.958 rows=1 loops=1)

  • Buffers: shared hit=600,794 read=124,899
6. 0.005 10,644.936 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,837.67..518,233.77 rows=1 width=1,402) (actual time=7,045.117..10,644.936 rows=1 loops=1)

  • Buffers: shared hit=600,792 read=124,899
7. 0.004 10,644.923 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,837.24..518,232.57 rows=1 width=1,117) (actual time=7,045.105..10,644.923 rows=1 loops=1)

  • Buffers: shared hit=600,792 read=124,899
8. 0.004 10,644.914 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,836.81..518,231.85 rows=1 width=1,115) (actual time=7,045.096..10,644.914 rows=1 loops=1)

  • Buffers: shared hit=600,792 read=124,899
9. 0.004 10,644.906 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,836.38..518,231.10 rows=1 width=1,096) (actual time=7,045.088..10,644.906 rows=1 loops=1)

  • Buffers: shared hit=600,792 read=124,899
10. 0.006 10,644.889 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,835.96..518,230.09 rows=1 width=984) (actual time=7,045.071..10,644.889 rows=1 loops=1)

  • Join Filter: ((pessoadocu1_.id_estado_expedidor)::integer = (estado7_.id_estado)::integer)
  • Rows Removed by Join Filter: 27
  • Buffers: shared hit=600,792 read=124,899
11. 0.005 10,644.872 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,835.96..518,228.48 rows=1 width=966) (actual time=7,045.055..10,644.872 rows=1 loops=1)

  • Buffers: shared hit=600,791 read=124,899
12. 0.007 10,644.861 ↑ 1.0 1 1

Nested Loop Left Join (cost=315,835.68..518,228.08 rows=1 width=877) (actual time=7,045.044..10,644.861 rows=1 loops=1)

  • Buffers: shared hit=600,791 read=124,899
13. 155.055 10,644.839 ↑ 1.0 1 1

Hash Join (cost=315,835.40..518,227.79 rows=1 width=859) (actual time=7,045.024..10,644.839 rows=1 loops=1)

  • Hash Cond: ((this_.id_pessoa)::integer = (pessoadocu1_.id_pessoa)::integer)
  • Buffers: shared hit=600,791 read=124,899
14. 596.679 9,797.843 ↑ 1.0 1,552,555 1

Hash Left Join (cost=243,341.27..439,896.55 rows=1,556,560 width=637) (actual time=3,696.243..9,797.843 rows=1,552,555 loops=1)

  • Hash Cond: ((this_2_.id_usuario_localizacao_inicial)::integer = (usuarioloc4_.id_usuario_localizacao)::integer)
  • Buffers: shared hit=149,608 read=124,899
15. 1,135.225 8,780.534 ↑ 1.0 1,552,555 1

Hash Join (cost=194,500.17..385,214.72 rows=1,556,560 width=602) (actual time=3,271.523..8,780.534 rows=1,552,555 loops=1)

  • Hash Cond: ((this_.id_pessoa)::integer = (this_1_.id_usuario)::integer)
  • Buffers: shared hit=119,512 read=124,899
16. 905.989 7,075.488 ↑ 1.0 1,552,555 1

Hash Left Join (cost=131,132.20..317,770.53 rows=1,552,843 width=596) (actual time=2,693.228..7,075.488 rows=1,552,555 loops=1)

  • Hash Cond: ((this_.id_pessoa)::integer = (this_5_.id_pessoa_juridica)::integer)
  • Buffers: shared hit=91,083 read=124,899
17. 1,218.539 6,086.305 ↑ 1.0 1,552,555 1

Hash Left Join (cost=125,230.68..307,792.78 rows=1,552,843 width=484) (actual time=2,608.998..6,086.305 rows=1,552,555 loops=1)

  • Hash Cond: ((this_.id_pessoa)::integer = (this_4_.id_pessoa_fisica)::integer)
  • Buffers: shared hit=89,025 read=124,899
18. 397.423 3,878.405 ↑ 1.0 1,552,555 1

Hash Left Join (cost=70,632.36..249,118.24 rows=1,552,843 width=316) (actual time=1,611.592..3,878.405 rows=1,552,555 loops=1)

  • Hash Cond: ((this_.id_pessoa)::integer = (this_3_.id_pessoa_autoridade)::integer)
  • Buffers: shared hit=65,411 read=124,899
19. 1,220.477 3,480.048 ↑ 1.0 1,552,555 1

Hash Join (cost=70,506.60..244,916.25 rows=1,552,843 width=308) (actual time=1,610.609..3,480.048 rows=1,552,555 loops=1)

  • Hash Cond: (this_2_.id_usuario = (this_.id_pessoa)::integer)
  • Buffers: shared hit=65,390 read=124,899
20. 657.622 657.622 ↑ 1.0 1,552,843 1

Seq Scan on tb_usuario_login this_2_ (cost=0.00..170,333.43 rows=1,552,843 width=289) (actual time=0.016..657.622 rows=1,552,843 loops=1)

  • Buffers: shared hit=29,906 read=124,899
21. 495.714 1,601.949 ↑ 1.0 1,552,555 1

Hash (cost=51,049.60..51,049.60 rows=1,556,560 width=19) (actual time=1,601.949..1,601.949 rows=1,552,555 loops=1)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 102,806kB
  • Buffers: shared hit=35,484
22. 1,106.235 1,106.235 ↑ 1.0 1,552,555 1

Seq Scan on tb_pessoa this_ (cost=0.00..51,049.60 rows=1,556,560 width=19) (actual time=0.013..1,106.235 rows=1,552,555 loops=1)

  • Buffers: shared hit=35,484
23. 0.565 0.934 ↑ 1.0 4,656 1

Hash (cost=67.56..67.56 rows=4,656 width=8) (actual time=0.934..0.934 rows=4,656 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 245kB
  • Buffers: shared hit=21
24. 0.369 0.369 ↑ 1.0 4,656 1

Seq Scan on tb_pessoa_autoridade this_3_ (cost=0.00..67.56 rows=4,656 width=8) (actual time=0.011..0.369 rows=4,656 loops=1)

  • Buffers: shared hit=21
25. 580.043 989.361 ↑ 1.0 1,377,081 1

Hash (cost=37,384.81..37,384.81 rows=1,377,081 width=168) (actual time=989.361..989.361 rows=1,377,081 loops=1)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 147,901kB
  • Buffers: shared hit=23,614
26. 409.318 409.318 ↑ 1.0 1,377,081 1

Seq Scan on tb_pessoa_fisica this_4_ (cost=0.00..37,384.81 rows=1,377,081 width=168) (actual time=0.011..409.318 rows=1,377,081 loops=1)

  • Buffers: shared hit=23,614
27. 46.588 83.194 ↑ 1.0 170,823 1

Hash (cost=3,766.23..3,766.23 rows=170,823 width=112) (actual time=83.194..83.194 rows=170,823 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 16,524kB
  • Buffers: shared hit=2,058
28. 36.606 36.606 ↑ 1.0 170,823 1

Seq Scan on tb_pessoa_juridica this_5_ (cost=0.00..3,766.23 rows=170,823 width=112) (actual time=0.012..36.606 rows=170,823 loops=1)

  • Buffers: shared hit=2,058
29. 369.103 569.821 ↑ 1.0 1,552,843 1

Hash (cost=43,957.43..43,957.43 rows=1,552,843 width=6) (actual time=569.821..569.821 rows=1,552,843 loops=1)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 77,042kB
  • Buffers: shared hit=28,429
30. 200.718 200.718 ↑ 1.0 1,552,843 1

Seq Scan on tb_usuario this_1_ (cost=0.00..43,957.43 rows=1,552,843 width=6) (actual time=0.013..200.718 rows=1,552,843 loops=1)

  • Buffers: shared hit=28,429
31. 179.947 420.630 ↓ 1.0 745,718 1

Hash (cost=39,523.10..39,523.10 rows=745,440 width=35) (actual time=420.630..420.630 rows=745,718 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 50,008kB
  • Buffers: shared hit=30,096
32. 159.237 240.683 ↓ 1.0 745,718 1

Hash Left Join (cost=19.91..39,523.10 rows=745,440 width=35) (actual time=0.239..240.683 rows=745,718 loops=1)

  • Hash Cond: ((usuarioloc4_.id_usuario_localizacao)::integer = (usuarioloc4_1_.id_pessoa_assit_adv_local)::integer)
  • Buffers: shared hit=30,096
33. 81.234 81.234 ↓ 1.0 745,718 1

Seq Scan on tb_usuario_localizacao usuarioloc4_ (cost=0.00..37,546.40 rows=745,440 width=21) (actual time=0.014..81.234 rows=745,718 loops=1)

  • Buffers: shared hit=30,092
34. 0.108 0.212 ↑ 1.0 707 1

Hash (cost=11.07..11.07 rows=707 width=14) (actual time=0.212..0.212 rows=707 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
  • Buffers: shared hit=4
35. 0.104 0.104 ↑ 1.0 707 1

Seq Scan on tb_pessoa_assist_adv_local usuarioloc4_1_ (cost=0.00..11.07 rows=707 width=14) (actual time=0.009..0.104 rows=707 loops=1)

  • Buffers: shared hit=4
36. 0.012 691.941 ↑ 1.0 1 1

Hash (cost=72,494.12..72,494.12 rows=1 width=230) (actual time=691.941..691.941 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=451,183
37. 691.911 691.929 ↑ 1.0 1 1

Nested Loop (cost=0.43..72,494.12 rows=1 width=230) (actual time=325.703..691.929 rows=1 loops=1)

  • Buffers: shared hit=451,183
  • -> Index Scan using idx_tb_pessoa_doc_identificacao1 on tb_pess_doc_identificacao pessoadocu1_ (cost=0.43..36246.45 rows=1 width=185) (actual time=162.840..345.950 rows (...)
38. 0.018 0.018 ↑ 1.0 2 1

Seq Scan on tb_tipo_doc_identificacao tipodocume2_ (cost=0.00..1.20 rows=2 width=45) (actual time=0.010..0.018 rows=2 loops=1)

  • Filter: (cd_tp_documento_identificacao = ANY ('{CPF,CPJ}'::bpchar[]))
  • Rows Removed by Filter: 14
  • Buffers: shared hit=1
  • Index Cond: (cd_tp_documento_identificacao = tipodocume2_.cd_tp_documento_identificacao)
  • Filter: (in_ativo AND (NOT in_usado_falsamente) AND (((nr_documento_identificacao)::text = '02893104665'::text) OR ((nr_documento_identificacao)::text = '028.931.04 (...)
  • Rows Removed by Filter: 557,964
  • Buffers: shared hit=451,182
39. 0.015 0.015 ↓ 0.0 0 1

Index Scan using tb_pessoa_assist_proc_local_pkey on tb_pess_assist_proc_local usuarioloc4_2_ (cost=0.28..0.30 rows=1 width=18) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: ((usuarioloc4_.id_usuario_localizacao)::integer = (id_pessoa_assist_proc_local)::integer)
40. 0.006 0.006 ↓ 0.0 0 1

Index Scan using tb_usuario_localizacao_magistrado_servidor_pkey on tb_usu_local_mgtdo_servdor usuarioloc5_ (cost=0.29..0.40 rows=1 width=89) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((usuarioloc4_.id_usuario_localizacao)::integer = (id_usu_local_mgstrado_servidor)::integer)
41. 0.011 0.011 ↑ 1.0 27 1

Seq Scan on tb_estado estado7_ (cost=0.00..1.27 rows=27 width=18) (actual time=0.009..0.011 rows=27 loops=1)

  • Buffers: shared hit=1
42. 0.013 0.013 ↓ 0.0 0 1

Index Scan using tb_pessoa_juridica_pkey on tb_pessoa_juridica pessoajuri9_ (cost=0.42..1.00 rows=1 width=112) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: ((this_3_.id_orgao_vinculacao)::integer = (id_pessoa_juridica)::integer)
43. 0.004 0.004 ↓ 0.0 0 1

Index Scan using tb_pessoa_pkey on tb_pessoa pessoajuri9_1_ (cost=0.43..0.76 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: ((pessoajuri9_.id_pessoa_juridica)::integer = (id_pessoa)::integer)
44. 0.005 0.005 ↓ 0.0 0 1

Index Scan using tb_usuario_pkey on tb_usuario pessoajuri9_2_ (cost=0.43..0.72 rows=1 width=6) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((pessoajuri9_.id_pessoa_juridica)::integer = (id_usuario)::integer)
45. 0.008 0.008 ↓ 0.0 0 1

Index Scan using tb_usuario_pkey on tb_usuario_login pessoajuri9_3_ (cost=0.43..1.20 rows=1 width=289) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((pessoajuri9_.id_pessoa_juridica)::integer = id_usuario)
46. 0.017 0.017 ↑ 1.0 1 1

Index Scan using tb_escolaridade_pkey on tb_escolaridade escolarida10_ (cost=0.13..0.15 rows=1 width=23) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: ((this_4_.id_escolaridade)::integer = (id_escolaridade)::integer)
  • Buffers: shared hit=2
47. 0.009 0.009 ↑ 1.0 1 1

Index Scan using tb_estado_civil_pkey on tb_estado_civil estadocivi11_ (cost=0.13..0.15 rows=1 width=14) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((this_4_.id_estado_civil)::integer = (id_estado_civil)::integer)
  • Buffers: shared hit=2
48. 0.008 0.008 ↑ 1.0 1 1

Index Scan using tb_etnia_pkey on tb_etnia etnia12_ (cost=0.13..0.15 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: ((this_4_.id_etnia)::integer = (id_etnia)::integer)
  • Buffers: shared hit=2
49. 0.011 0.011 ↑ 1.0 1 1

Index Scan using tb_pais_pkey on tb_pais pais13_ (cost=0.14..0.16 rows=1 width=22) (actual time=0.011..0.011 rows=1 loops=1)

  • Index Cond: (this_4_.id_pais = id_pais)
  • Buffers: shared hit=2
50. 0.005 0.005 ↓ 0.0 0 1

Index Scan using tb_profissao_pkey on tb_profissao profissao14_ (cost=0.28..0.34 rows=1 width=47) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((this_4_.id_profissao)::integer = (id_profissao)::integer)
Planning time : 10.363 ms
Execution time : 10,647.851 ms