explain.depesz.com

PostgreSQL's explain analyze made readable

Result: majG : Optimization for: plan #nL1l

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 94.010 251.004 ↓ 1.0 49,973 1

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

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

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

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

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

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

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

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