explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nL1l

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 120.866 294.344 ↓ 1.0 49,973 1

Hash Join (cost=3,034.04..6,645.48 rows=49,921 width=297) (actual time=110.217..294.344 rows=49,973 loops=1)

  • Hash Cond: (empresas_sucursales.empresa_id = emp.id)
2. 63.301 63.301 ↓ 1.0 49,975 1

Seq Scan on empresas_sucursales (cost=0.00..2,612.99 rows=49,924 width=293) (actual time=0.013..63.301 rows=49,975 loops=1)

  • Filter: (type = 1)
  • Rows Removed by Filter: 5624
3. 48.726 110.177 ↓ 1.0 49,834 1

Hash (cost=2,411.13..2,411.13 rows=49,833 width=20) (actual time=110.177..110.177 rows=49,834 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 2340kB
4. 61.451 61.451 ↓ 1.0 49,834 1

Seq Scan on empresas emp (cost=0.00..2,411.13 rows=49,833 width=20) (actual time=0.013..61.451 rows=49,834 loops=1)

  • Filter: (((document)::text <> '0'::text) AND ((document)::text <> ''::text) AND ((document)::text <> '-'::text))
  • Rows Removed by Filter: 2