explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GlpP

Settings
# exclusive inclusive rows x rows loops node
1. 3.001 90.622 ↑ 1.0 1 1

Aggregate (cost=1,803.80..1,803.81 rows=1 width=32) (actual time=90.621..90.622 rows=1 loops=1)

2. 4.453 87.621 ↓ 109.5 6,679 1

Nested Loop (cost=209.41..1,803.04 rows=61 width=24) (actual time=2.859..87.621 rows=6,679 loops=1)

3. 6.019 69.810 ↓ 109.5 6,679 1

Nested Loop (cost=209.12..1,749.94 rows=61 width=28) (actual time=2.846..69.810 rows=6,679 loops=1)

4. 2.583 39.851 ↓ 60.0 3,420 1

Nested Loop (cost=208.83..1,633.49 rows=57 width=8) (actual time=2.812..39.851 rows=3,420 loops=1)

5. 2.943 30.428 ↓ 60.0 3,420 1

Hash Join (cost=208.55..1,613.52 rows=57 width=8) (actual time=2.802..30.428 rows=3,420 loops=1)

  • Hash Cond: (tlsos."tlsostosID" = trec."trectosID")
6. 4.937 24.756 ↓ 60.9 4,993 1

Subquery Scan on tlsos (cost=0.29..1,403.97 rows=82 width=4) (actual time=0.038..24.756 rows=4,993 loops=1)

  • Filter: (tlsos.rr = 1)
  • Rows Removed by Filter: 11374
7. 12.129 19.819 ↑ 1.0 16,367 1

WindowAgg (cost=0.29..1,198.93 rows=16,403 width=20) (actual time=0.030..19.819 rows=16,367 loops=1)

8. 7.690 7.690 ↑ 1.0 16,367 1

Index Only Scan using idx_tlsos_tlsostosdesc on "TabLogSituacaoOrdemServico" (cost=0.29..911.88 rows=16,403 width=8) (actual time=0.020..7.690 rows=16,367 loops=1)

  • Heap Fetches: 16367
9. 1.018 2.729 ↑ 1.0 3,420 1

Hash (cost=165.10..165.10 rows=3,453 width=12) (actual time=2.729..2.729 rows=3,420 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 179kB
10. 1.711 1.711 ↑ 1.0 3,437 1

Seq Scan on "TabReceita" trec (cost=0.00..165.10 rows=3,453 width=12) (actual time=0.009..1.711 rows=3,437 loops=1)

  • Filter: ("trectemID" = 1)
  • Rows Removed by Filter: 2909
11. 6.840 6.840 ↑ 1.0 1 3,420

Index Scan using "TabCliente_tclID" on "TabCliente" tcl (cost=0.28..0.34 rows=1 width=8) (actual time=0.001..0.002 rows=1 loops=3,420)

  • Index Cond: ("tclID" = trec."trectclID")
12. 23.940 23.940 ↓ 2.0 2 3,420

Index Scan using idx_trp_trecid_trpsubstituida on "TabReceitaParcela" trp (cost=0.29..2.03 rows=1 width=40) (actual time=0.005..0.007 rows=2 loops=3,420)

  • Index Cond: (("trptrecID" = trec."trecID") AND ("trpSubstituida" = false))
  • Filter: ((NOT "trpBaixada") AND (NOT "trpSubstituida") AND (NOT "trpPago") AND (NOT "trpEmitidoRemessa") AND (NOT "trpIsExcluido"))
  • Rows Removed by Filter: 9
13. 13.358 13.358 ↑ 1.0 1 6,679

Index Only Scan using "TabPessoaID" on "TabPessoa" tpe (cost=0.29..0.86 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=6,679)

  • Index Cond: ("tpeID" = tcl."tcltpeID")
  • Heap Fetches: 6679
Planning time : 1.830 ms
Execution time : 90.769 ms