explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iA8f

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,010.227 ↓ 0.0 0 1

Nested Loop Left Join (cost=711.78..1,023.59 rows=1 width=1,276) (actual time=2,010.227..2,010.227 rows=0 loops=1)

  • Join Filter: ((t1.co_protocolo)::text = (solicitacaolida.co_protocolo)::text)
2. 0.002 2,010.227 ↓ 0.0 0 1

Hash Left Join (cost=707.17..927.27 rows=1 width=1,246) (actual time=2,010.227..2,010.227 rows=0 loops=1)

  • Hash Cond: (upper((t1.no_tipo_status)::text) = (ts.no_tipo_status)::text)
3. 26.454 2,010.225 ↓ 0.0 0 1

Hash Right Join (cost=705.86..925.94 rows=1 width=1,144) (actual time=2,010.225..2,010.225 rows=0 loops=1)

  • Hash Cond: (((sub_compartilhamento.co_protocolo)::text) = (t1.co_protocolo)::text)
  • Filter: (((u.id_pessoa = 16031) AND (t1.id_tipo_solicitacao = 2)) OR (((t1.co_protocolo)::text = ANY ('{1046161555103273042019,1134561551453747032019,9912231549032337022019}'::text[])) AND (t1_1.id_tipo_solicitacao = 2)))
  • Rows Removed by Filter: 60899
4. 3.373 881.328 ↑ 1.5 5,267 1

HashAggregate (cost=531.06..612.20 rows=8,114 width=32) (actual time=880.390..881.328 rows=5,267 loops=1)

  • Group Key: sub_compartilhamento.co_protocolo, t1_1.id_tipo_solicitacao, t1_1.id_subtipo_solicitacao, tipo_status_interna.id_tipo_status
5. 13.262 877.955 ↓ 1.0 8,369 1

Hash Right Join (cost=327.05..429.63 rows=8,114 width=32) (actual time=802.833..877.955 rows=8,369 loops=1)

  • Hash Cond: ((t1_1.co_protocolo)::text = (sub_compartilhamento.co_protocolo)::text)
6. 57.747 861.795 ↓ 61.4 61,415 1

Hash Left Join (cost=1.32..18.27 rows=1,000 width=130) (actual time=799.922..861.795 rows=61,415 loops=1)

  • Hash Cond: (lower((t1_1.no_tipo_status)::text) = lower((tipo_status_interna.no_tipo_status)::text))
7. 804.026 804.026 ↓ 61.4 61,415 1

Function Scan on dblink t1_1 (cost=0.00..10.00 rows=1,000 width=244) (actual time=799.883..804.026 rows=61,415 loops=1)

8. 0.016 0.022 ↓ 1.1 15 1

Hash (cost=1.14..1.14 rows=14 width=122) (actual time=0.022..0.022 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
9. 0.006 0.006 ↓ 1.1 15 1

Seq Scan on tb_tipo_status tipo_status_interna (cost=0.00..1.14 rows=14 width=122) (actual time=0.006..0.006 rows=15 loops=1)

10. 1.392 2.898 ↓ 1.0 8,369 1

Hash (cost=224.31..224.31 rows=8,114 width=20) (actual time=2.898..2.898 rows=8,369 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 431kB
11. 1.506 1.506 ↓ 1.0 8,369 1

Seq Scan on tb_compartilhamento sub_compartilhamento (cost=0.00..224.31 rows=8,114 width=20) (actual time=0.004..1.506 rows=8,369 loops=1)

  • Filter: (dt_exclusao IS NULL)
  • Rows Removed by Filter: 229
12. 19.998 1,102.443 ↓ 3,044.9 60,899 1

Hash (cost=174.55..174.55 rows=20 width=1,112) (actual time=1,102.443..1,102.443 rows=60,899 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 7146kB
13. 43.961 1,082.445 ↓ 3,044.9 60,899 1

Nested Loop (cost=0.29..174.55 rows=20 width=1,112) (actual time=781.723..1,082.445 rows=60,899 loops=1)

14. 792.824 792.824 ↓ 3,070.8 61,415 1

Function Scan on dblink t1 (cost=0.00..16.25 rows=20 width=1,620) (actual time=781.698..792.824 rows=61,415 loops=1)

  • Filter: ((id_tipo_solicitacao = 2) OR ((co_protocolo)::text = ANY ('{1046161555103273042019,1134561551453747032019,9912231549032337022019}'::text[])))
15. 245.660 245.660 ↑ 1.0 1 61,415

Index Scan using idx_no_login on tb_usuario u (cost=0.29..7.91 rows=1 width=22) (actual time=0.004..0.004 rows=1 loops=61,415)

  • Index Cond: ((no_login)::text = (t1.reporter_id_pessoa)::text)
16. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.14..1.14 rows=14 width=220) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on tb_tipo_status ts (cost=0.00..1.14 rows=14 width=220) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on tb_solicitacao_lida solicitacaolida (cost=4.61..96.19 rows=9 width=30) (never executed)

  • Recheck Cond: (id_pessoa = 16031)
  • Filter: (NOT in_administrador)
19. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ind_solicitacao_lida_id_pessoa (cost=0.00..4.61 rows=25 width=0) (never executed)

  • Index Cond: (id_pessoa = 16031)
Planning time : 0.703 ms
Execution time : 2,014.582 ms