explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gYQU

Settings
# exclusive inclusive rows x rows loops node
1. 2.978 89.120 ↑ 1.0 1 1

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

2. 4.274 86.142 ↓ 109.5 6,679 1

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

3. 5.327 68.510 ↓ 109.5 6,679 1

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

4. 2.579 39.243 ↓ 60.0 3,420 1

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

5. 2.762 29.824 ↓ 60.0 3,420 1

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

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

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

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

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

8. 7.571 7.571 ↑ 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.014..7.571 rows=16,367 loops=1)

  • Heap Fetches: 16367
9. 0.984 2.692 ↑ 1.0 3,420 1

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

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

Seq Scan on "TabReceita" trec (cost=0.00..165.10 rows=3,453 width=12) (actual time=0.007..1.708 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 : 0.854 ms
Execution time : 89.263 ms