explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A2Vx

Settings
# exclusive inclusive rows x rows loops node
1. 4.101 12,262.152 ↑ 1.0 1,000 1

Limit (cost=135,665.48..135,720.48 rows=1,000 width=193) (actual time=12,249.435..12,262.152 rows=1,000 loops=1)

2. 5.972 12,258.051 ↑ 442.4 1,000 1

Unique (cost=135,665.48..159,995.55 rows=442,365 width=193) (actual time=12,249.429..12,258.051 rows=1,000 loops=1)

3. 2,868.163 12,252.079 ↑ 442.4 1,000 1

Sort (cost=135,665.48..136,771.39 rows=442,365 width=193) (actual time=12,249.421..12,252.079 rows=1,000 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.auto (...)
  • Sort Method: external merge Disk: 82192kB
4. 2,645.374 9,383.916 ↑ 1.0 441,954 1

Hash Join (cost=16,712.22..51,846.97 rows=442,365 width=193) (actual time=2,282.558..9,383.916 rows=441,954 loops=1)

  • Hash Cond: (e.project_id = c.id)
5. 2,290.396 6,734.063 ↑ 1.0 441,954 1

Hash Join (cost=16,664.57..37,358.41 rows=442,365 width=141) (actual time=2,277.961..6,734.063 rows=441,954 loops=1)

  • Hash Cond: (d.expedient_id = e.id)
6. 2,189.928 2,189.928 ↑ 1.0 441,954 1

Seq Scan on documents d (cost=0.00..19,532.61 rows=442,365 width=111) (actual time=0.077..2,189.928 rows=441,954 loops=1)

  • Filter: ((NOT status_no_tramitat) AND (NOT preliminar))
  • Rows Removed by Filter: 6507
7. 899.909 2,253.739 ↑ 1.0 280,381 1

Hash (cost=13,159.81..13,159.81 rows=280,381 width=38) (actual time=2,253.734..2,253.739 rows=280,381 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 21416kB
8. 1,353.830 1,353.830 ↑ 1.0 280,381 1

Seq Scan on expedients e (cost=0.00..13,159.81 rows=280,381 width=38) (actual time=0.162..1,353.830 rows=280,381 loops=1)

9. 1.525 4.479 ↑ 1.0 562 1

Hash (cost=40.62..40.62 rows=562 width=41) (actual time=4.475..4.479 rows=562 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 47kB
10. 2.954 2.954 ↑ 1.0 562 1

Seq Scan on projectes c (cost=0.00..40.62 rows=562 width=41) (actual time=0.082..2.954 rows=562 loops=1)