explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ApOn

Settings
# exclusive inclusive rows x rows loops node
1. 0.124 216.380 ↓ 14.0 14 1

Nested Loop Anti Join (cost=477.06..485.10 rows=1 width=354) (actual time=213.492..216.380 rows=14 loops=1)

2.          

CTE anagdocreg

3. 0.709 214.027 ↓ 8.1 348 1

WindowAgg (cost=476.31..477.06 rows=43 width=1,340) (actual time=213.260..214.027 rows=348 loops=1)

4.          

CTE anag

5. 208.345 208.345 ↓ 2.7 348 1

Index Scan using dmacl_t_anagregistry_identificativoassistito_idx on dmacl_t_anagregistry a (cost=0.00..145.51 rows=128 width=73) (actual time=0.505..208.345 rows=348 loops=1)

  • Index Cond: ((identificativoassistito)::text = 'CRTNTN37C24G136A'::text)
6. 0.947 213.318 ↓ 8.1 348 1

Sort (cost=330.79..330.90 rows=43 width=1,340) (actual time=213.246..213.318 rows=348 loops=1)

  • Sort Key: b.datavalidazionedocumento
  • Sort Method: quicksort Memory: 378kB
7. 0.599 212.371 ↓ 8.1 348 1

Nested Loop (cost=0.00..329.63 rows=43 width=1,340) (actual time=0.540..212.371 rows=348 loops=1)

8. 208.640 208.640 ↓ 2.7 348 1

CTE Scan on anag (cost=0.00..2.56 rows=128 width=8) (actual time=0.508..208.640 rows=348 loops=1)

9. 3.132 3.132 ↑ 1.0 1 348

Index Scan using ie_dmacl_t_doc_registry_idpazregistry on dmacl_t_doc_registry b (cost=0.00..2.55 rows=1 width=1,332) (actual time=0.008..0.009 rows=1 loops=348)

  • Index Cond: (idpazregistry = anag.idpazregistry)
  • Filter: (strpos((iddocumentooid)::text, '010'::text) > 0)
10. 0.126 215.680 ↓ 18.0 18 1

Nested Loop (cost=0.00..5.24 rows=1 width=354) (actual time=213.413..215.680 rows=18 loops=1)

  • Join Filter: (now() <= (z.datavalidazionedocumento + ('1 day'::interval * (COALESCE(d.durata_validita, 31))::double precision)))
  • Rows Removed by Join Filter: 23
11. 0.056 215.390 ↓ 41.0 41 1

Nested Loop (cost=0.00..3.96 rows=1 width=334) (actual time=213.374..215.390 rows=41 loops=1)

12. 215.047 215.047 ↓ 41.0 41 1

CTE Scan on anagdocreg z (cost=0.00..1.40 rows=1 width=326) (actual time=213.359..215.047 rows=41 loops=1)

  • Filter: (((tipologiadcoumentomedio)::text = ANY ('{57833-6,57832-8}'::text[])) AND ((statodocentry)::text = 'APPROVED'::text) AND ((tipologiadocumentoalto)::text = 'PRS'::text) AND (rank = 1) AND ((tipologiadcoumentomedio)::text = '57832-8'::text))
  • Rows Removed by Filter: 307
13. 0.287 0.287 ↑ 1.0 1 41

Index Scan using ie_dmacl_t_nre_registry_iddocregistry on dmacl_t_nre_registry c (cost=0.00..2.55 rows=1 width=24) (actual time=0.006..0.007 rows=1 loops=41)

  • Index Cond: (iddocregistry = z.id)
14. 0.164 0.164 ↑ 1.0 1 41

Seq Scan on dmacl_d_catalogo_tipo_documento d (cost=0.00..1.26 rows=1 width=33) (actual time=0.001..0.004 rows=1 loops=41)

  • Filter: ((codice_tipo_doc)::text = '57832-8'::text)
  • Rows Removed by Filter: 20
15. 0.576 0.576 ↓ 0.0 0 18

Index Only Scan using ie_dmacl_t_doc_registry_iddocumentooid on dmacl_t_doc_registry y (cost=0.00..2.78 rows=1 width=52) (actual time=0.032..0.032 rows=0 loops=18)

  • Index Cond: (iddocumentooid = replace((z.iddocumentooid)::text, '_PRE'::text, '_ERO'::text))
  • Heap Fetches: 4"Total runtime: 216.588 ms