explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jEPn

Settings
# exclusive inclusive rows x rows loops node
1. 1.543 9,560.748 ↑ 1.0 1,000 1

Limit (cost=149,439.41..149,466.91 rows=1,000 width=84) (actual time=9,554.835..9,560.748 rows=1,000 loops=1)

2. 2.860 9,559.205 ↑ 479.7 1,000 1

Unique (cost=149,439.41..162,631.16 rows=479,700 width=84) (actual time=9,554.830..9,559.205 rows=1,000 loops=1)

3. 1,758.723 9,556.345 ↑ 289.5 1,657 1

Sort (cost=149,439.41..150,638.66 rows=479,700 width=84) (actual time=9,554.824..9,556.345 rows=1,657 loops=1)

  • Sort Key: f.id DESC, f.data_creada, f.serie, f.interessat_principal_nom, f.tipus_factura_4d, f.referencia_centre_expedient, f.honoraris_total, f.saldo_liquidacio, f.saldo_client, f.tipus
  • Sort Method: external merge Disk: 47,560kB
4. 2,314.766 7,797.622 ↓ 1.0 482,496 1

Hash Join (cost=53,183.62..81,218.96 rows=479,700 width=84) (actual time=4,254.703..7,797.622 rows=482,496 loops=1)

  • Hash Cond: (fd.factura_id = f.id)
5. 1,229.356 1,229.356 ↓ 1.0 483,008 1

Seq Scan on factures_detalls fd (cost=0.00..15,932.99 rows=480,129 width=4) (actual time=0.028..1,229.356 rows=483,008 loops=1)

  • Filter: (origen_tipus = 1)
  • Rows Removed by Filter: 202,271
6. 1,766.218 4,253.500 ↓ 1.0 518,952 1

Hash (cost=39,611.71..39,611.71 rows=518,553 width=84) (actual time=4,253.499..4,253.500 rows=518,952 loops=1)

  • Buckets: 524,288 Batches: 2 Memory Usage: 33,801kB
7. 2,487.282 2,487.282 ↓ 1.0 518,952 1

Seq Scan on factures f (cost=0.00..39,611.71 rows=518,553 width=84) (actual time=0.025..2,487.282 rows=518,952 loops=1)

  • Filter: (tipus <> 108)
  • Rows Removed by Filter: 10
Planning time : 1.667 ms
Execution time : 9,591.996 ms