explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vPk0i

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 20.160 27,373.509 ↓ 4.3 1,890 1

Hash Join (cost=165.57..1,504,478.48 rows=439 width=164) (actual time=29.000..27,373.509 rows=1,890 loops=1)

  • Hash Cond: (tsxpaipl4sm."tsxpaipl4smtvdID" = tvd."tvdID")
2. 3.518 20.136 ↓ 4.3 1,890 1

Hash Join (cost=164.24..2,925.38 rows=439 width=52) (actual time=15.134..20.136 rows=1,890 loops=1)

  • Hash Cond: (tsxpaipl4sm."tsxpaipl4smtmuID" = tmu."tmuID")
3. 13.189 13.189 ↓ 4.3 1,890 1

Seq Scan on "TabSICIXMLQAIPL4SM" tsxpaipl4sm (cost=0.00..2,755.11 rows=439 width=35) (actual time=11.649..13.189 rows=1,890 loops=1)

  • Filter: ("tsxpaipl4smtscID" = 29480)
  • Rows Removed by Filter: 131100
4. 1.854 3.429 ↑ 1.0 5,566 1

Hash (cost=94.66..94.66 rows=5,566 width=21) (actual time=3.429..3.429 rows=5,566 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 361kB
5. 1.575 1.575 ↑ 1.0 5,566 1

Seq Scan on "TabMunicipio" tmu (cost=0.00..94.66 rows=5,566 width=21) (actual time=0.009..1.575 rows=5,566 loops=1)

6. 0.025 0.033 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=36) (actual time=0.032..0.033 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.008 0.008 ↑ 1.0 15 1

Seq Scan on "TabViaDistribuicao" tvd (cost=0.00..1.15 rows=15 width=36) (actual time=0.006..0.008 rows=15 loops=1)

8.          

SubPlan (forHash Join)

9. 13.230 27,333.180 ↑ 1.0 1 1,890

Aggregate (cost=3,420.36..3,420.37 rows=1 width=8) (actual time=14.462..14.462 rows=1 loops=1,890)

10. 27,319.950 27,319.950 ↓ 5.0 5 1,890

Seq Scan on "TabSICIXMLQAIPL4SM" t1 (cost=0.00..3,420.36 rows=1 width=8) (actual time=14.356..14.455 rows=5 loops=1,890)

  • Filter: (("tsxpaipl4smFaixa" IS NOT NULL) AND ("tsxpaipl4smtmuID" = tsxpaipl4sm."tsxpaipl4smtmuID") AND ("tsxpaipl4smtscID" = 29480) AND ("tsxpaipl4smtvdID" = tsxpaipl4sm."tsxpaipl4smtvdID"))
  • Rows Removed by Filter: 132985
Planning time : 0.286 ms
Execution time : 27,374.511 ms