explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1VII

Settings
# exclusive inclusive rows x rows loops node
1. 0.156 14,527.563 ↑ 227.3 11 1

Hash Join (cost=50,016.96..100,060,106.96 rows=2,500 width=623) (actual time=14,516.744..14,527.563 rows=11 loops=1)

  • Hash Cond: (doc.id = t.tp_doc_id)
2. 0.555 0.555 ↑ 1,000.0 1 1

Foreign Scan on tipo_documento doc (cost=10,000.00..20,000.00 rows=1,000 width=76) (actual time=0.546..0.555 rows=1 loops=1)

  • Oracle query: SELECT /*e152d44a1c7d46c45c0d8840dce1152e*/ r4.""ID"", r4.""COD_TP_DOC"", r4.""DESCRICAO"" FROM ""FOCCO3I"".""TTP_DOC"" r4 WHERE (r4.""COD_TP_DOC"" = 'LOJ')
3. 0.056 14,514.774 ↑ 13.9 36 1

Hash (cost=40,010.71..40,010.71 rows=500 width=496) (actual time=14,514.773..14,514.774 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
4. 258.902 14,514.718 ↑ 13.9 36 1

Hash Join (cost=30,002.52..40,010.71 rows=500 width=496) (actual time=14,328.977..14,514.718 rows=36 loops=1)

  • Hash Cond: (t.cli_id = estabelecimentos.cli_id)
5. 14,251.077 14,251.077 ↓ 672.8 672,804 1

Foreign Scan (cost=10,000.00..20,000.00 rows=1,000 width=496) (actual time=1.290..14,251.077 rows=672,804 loops=1)

  • Oracle query: SELECT /*6bc556739ee166a1d84e7b56ca8f24ae*/ r1.""CLI_ID"", r1.""DT_EMIS"", r1.""DT_ULT_MOV"", r1.""DT_VCTO"", r1.""EST_ID"", r1.""EST_ID_FAT"", r1.""POR_ID"", r1.""TP_DOC_ID"", r1.""ID"", r1.""NFS_ID"", r1.""NSU"", r1.""NUM_TIT"", r1.""PARC"", r1.""VLR_AB"", r1.""VLR_TIT"", r1.""VLR_DESC"", r1.""VLR_JUROS"", r1.""VLR_MULTA"", r1.""VLR_PGTO"" FROM (""FOCCO3I"".""TTIT_CR"" r1 INNER JOIN ""FOCCO3I"".""TEMPRESAS"" r2 ON (r1.""EMPR_ID"" = r2.""ID""))
6. 0.012 4.739 ↑ 1.0 1 1

Hash (cost=20,002.51..20,002.51 rows=1 width=32) (actual time=4.738..4.739 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.020 4.727 ↑ 1.0 1 1

HashAggregate (cost=20,002.50..20,002.51 rows=1 width=32) (actual time=4.727..4.727 rows=1 loops=1)

  • Group Key: estabelecimentos.cli_id
8. 4.707 4.707 ↑ 333.3 3 1

Foreign Scan on estabelecimentos (cost=10,000.00..20,000.00 rows=1,000 width=32) (actual time=4.680..4.707 rows=3 loops=1)

  • Oracle query: SELECT /*3cc62a1932b787ca6e476f562f9291ad*/ r7.""CLI_ID"", r7.""CNPJ"", r7.""CPF"" FROM ""FOCCO3I"".""TESTABELECIMENTOS"" r7 WHERE ((r7.""CPF"" = 8409017989) OR (r7.""CNPJ"" = 8409017989))
9.          

SubPlan (forHash Join)

10. 6.116 6.116 ↑ 1,000.0 1 11

Foreign Scan on clientes (cost=10,000.00..20,000.00 rows=1,000 width=14) (actual time=0.545..0.556 rows=1 loops=11)

  • Oracle query: SELECT /*60310cafc089bf886d6cd9b5c9e26c56*/ r1.""ID"", r1.""COD_CLI"" FROM ""FOCCO3I"".""TCLIENTES"" r1 WHERE (r1.""ID"" = :p1)
11. 5.962 5.962 ↑ 1,000.0 1 11

Foreign Scan on clientes clientes_1 (cost=10,000.00..20,000.00 rows=1,000 width=53) (actual time=0.531..0.542 rows=1 loops=11)

  • Oracle query: SELECT /*30e1933370c3acad5d0389ed2b87e6da*/ r1.""ID"", r1.""DESCRICAO"" FROM ""FOCCO3I"".""TCLIENTES"" r1 WHERE (r1.""ID"" = :p1)