explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DWHd

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 0.103 ↓ 0.0 0 1

Sort (cost=617.26..617.26 rows=1 width=14) (actual time=0.103..0.103 rows=0 loops=1)

  • Sort Key: idrevs.seq, master.id, master.rev
  • Sort Method: quicksort Memory: 25kB
2.          

CTE idrevs

3. 0.000 0.077 ↓ 0.0 0 1

Limit (cost=565.48..565.49 rows=1 width=6) (actual time=0.077..0.077 rows=0 loops=1)

4. 0.002 0.077 ↓ 0.0 0 1

HashAggregate (cost=565.48..565.49 rows=1 width=6) (actual time=0.077..0.077 rows=0 loops=1)

  • Group Key: "P/infrazione".id, "P/infrazione".rev, 0
5. 0.000 0.075 ↓ 0.0 0 1

Nested Loop (cost=1.86..565.47 rows=1 width=6) (actual time=0.075..0.075 rows=0 loops=1)

6. 0.000 0.075 ↓ 0.0 0 1

Nested Loop (cost=1.57..565.01 rows=1 width=12) (actual time=0.075..0.075 rows=0 loops=1)

  • Join Filter: (("P/infrazione".id = "L/infrazione/anagrafiche:1".father_id) AND ("P/infrazione".rev = "L/infrazione/anagrafiche:1".father_rev))
7. 0.000 0.075 ↓ 0.0 0 1

Nested Loop (cost=1.14..564.47 rows=1 width=12) (actual time=0.075..0.075 rows=0 loops=1)

8. 0.000 0.075 ↓ 0.0 0 1

Nested Loop (cost=0.85..564.14 rows=1 width=18) (actual time=0.075..0.075 rows=0 loops=1)

9. 0.075 0.075 ↓ 0.0 0 1

Index Scan using table_infrazione_anno_registro_idx on table_infrazione "P/infrazione" (cost=0.42..555.68 rows=1 width=6) (actual time=0.075..0.075 rows=0 loops=1)

  • Index Cond: (anno_registro = 2020)
  • Filter: ((contestato_su_strada IS TRUE) AND (cache_w8_comm IS TRUE) AND (notifica_os IS TRUE) AND (lastrev IS TRUE) AND (infrazione_data <= '2019-10-15 10:52:05'::timestamp without time zone) AND ((procedura)::text = 'verbale'::text))
  • Rows Removed by Filter: 68
10. 0.000 0.000 ↓ 0.0 0

Index Scan using link_infrazione_anagrafiche_father_idx on link_infrazione_anagrafiche "L/infrazione/anagrafiche" (cost=0.42..8.45 rows=1 width=12) (never executed)

  • Index Cond: ((father_id = "P/infrazione".id) AND (father_rev = "P/infrazione".rev))
  • Filter: (obbligato_solido AND ((veicolo)::text <> ''::text))
11. 0.000 0.000 ↓ 0.0 0

Index Only Scan using table_anagrafica_pkey on table_anagrafica "P/infrazione/anagrafiche" (cost=0.29..0.32 rows=1 width=6) (never executed)

  • Index Cond: ((id = "L/infrazione/anagrafiche".child_id) AND (rev = "L/infrazione/anagrafiche".child_rev))
  • Heap Fetches: 0
12. 0.000 0.000 ↓ 0.0 0

Index Scan using link_infrazione_anagrafiche_father_idx on link_infrazione_anagrafiche "L/infrazione/anagrafiche:1" (cost=0.42..0.53 rows=1 width=12) (never executed)

  • Index Cond: ((father_id = "L/infrazione/anagrafiche".father_id) AND (father_rev = "L/infrazione/anagrafiche".father_rev))
  • Filter: (trasgressore AND (NOT obbligato_solido))
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using table_anagrafica_pkey on table_anagrafica "P/infrazione/anagrafiche:1" (cost=0.29..0.45 rows=1 width=6) (never executed)

  • Index Cond: ((id = "L/infrazione/anagrafiche:1".child_id) AND (rev = "L/infrazione/anagrafiche:1".child_rev))
  • Heap Fetches: 0
14. 0.001 0.078 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.58..51.76 rows=1 width=14) (actual time=0.078..0.078 rows=0 loops=1)

15. 0.000 0.077 ↓ 0.0 0 1

Nested Loop (cost=0.42..51.58 rows=1 width=10) (actual time=0.077..0.077 rows=0 loops=1)

16. 0.077 0.077 ↓ 0.0 0 1

CTE Scan on idrevs (cost=0.00..0.02 rows=1 width=10) (actual time=0.077..0.077 rows=0 loops=1)

17. 0.000 0.000 ↓ 0.0 0

Index Scan using table_infrazione_pkey on table_infrazione master (cost=0.42..51.55 rows=1 width=7) (never executed)

  • Index Cond: (id = idrevs.id)
  • Filter: (((idrevs.rev IS NOT NULL) AND (rev = idrevs.rev)) OR ((idrevs.rev IS NULL) AND (lastrev IS TRUE)))
18. 0.000 0.000 ↓ 0.0 0

Index Scan using batch_lock_node_id_key on batch_lock (cost=0.15..0.17 rows=1 width=8) (never executed)

  • Index Cond: (master.id = node_id)
Planning time : 4.297 ms
Execution time : 0.327 ms