explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IukR

Settings
# exclusive inclusive rows x rows loops node
1. 2,114.551 20,982.509 ↓ 1.0 447,828 1

Unique (cost=178,412.80..205,236.94 rows=447,069 width=176) (actual time=17,823.243..20,982.509 rows=447,828 loops=1)

2. 4,271.642 18,867.958 ↓ 1.0 447,828 1

Sort (cost=178,412.80..179,530.47 rows=447,069 width=176) (actual time=17,823.233..18,867.958 rows=447,828 loops=1)

  • Sort Key: d.id DESC, ((((((e.expedient)::text || '/'::text) || (d.posicio)::text) || '/'::text) || (d.dc)::text)), e.referencia_centre, e.extern_id, d.data_alta_document, d.data_document, d.registres_text, d.in_nom, d.actes_descripcio, d.autoritzan (...)
  • Sort Method: external merge Disk: 73560kB
3. 3,204.327 14,596.316 ↓ 1.0 447,828 1

Hash Left Join (cost=44,230.58..98,252.57 rows=447,069 width=176) (actual time=4,632.179..14,596.316 rows=447,828 loops=1)

  • Hash Cond: (d.id = v.document_id)
4. 2,045.272 8,953.057 ↓ 1.0 447,828 1

Hash Join (cost=26,410.83..63,109.00 rows=447,069 width=140) (actual time=2,185.333..8,953.057 rows=447,828 loops=1)

  • Hash Cond: (e.project_id = c.id)
5. 2,452.242 6,898.181 ↓ 1.0 447,828 1

Hash Join (cost=26,275.48..61,791.38 rows=447,069 width=144) (actual time=2,175.679..6,898.181 rows=447,828 loops=1)

  • Hash Cond: (d.expedient_id = e.id)
6. 2,282.026 2,282.026 ↓ 1.0 447,828 1

Seq Scan on documents d (cost=0.00..34,342.32 rows=447,069 width=114) (actual time=0.143..2,282.026 rows=447,828 loops=1)

  • Filter: ((NOT status_no_tramitat) AND (NOT preliminar))
  • Rows Removed by Filter: 6396
7. 864.821 2,163.913 ↓ 1.0 283,430 1

Hash (cost=22,821.88..22,821.88 rows=276,288 width=38) (actual time=2,163.911..2,163.913 rows=283,430 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 21625kB
8. 1,299.092 1,299.092 ↓ 1.0 283,430 1

Seq Scan on expedients e (cost=0.00..22,821.88 rows=276,288 width=38) (actual time=0.154..1,299.092 rows=283,430 loops=1)

9. 1.835 9.604 ↓ 1.0 577 1

Hash (cost=128.21..128.21 rows=571 width=4) (actual time=9.603..9.604 rows=577 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
10. 7.769 7.769 ↓ 1.0 577 1

Index Only Scan using projectes_id_key on projectes c (cost=0.28..128.21 rows=571 width=4) (actual time=0.195..7.769 rows=577 loops=1)

  • Heap Fetches: 238
11. 1,060.414 2,438.932 ↓ 1.0 454,218 1

Hash (cost=12,143.22..12,143.22 rows=454,122 width=16) (actual time=2,438.931..2,438.932 rows=454,218 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 23006kB
12. 1,378.518 1,378.518 ↓ 1.0 454,218 1

Seq Scan on vm_dades_adicionals_documents v (cost=0.00..12,143.22 rows=454,122 width=16) (actual time=0.135..1,378.518 rows=454,218 loops=1)

Planning time : 26.879 ms
Execution time : 21,779.596 ms