<p>Any content or relationships that belong to the Matrix block will also be deleted, <em>when you save the entry</em>. If there were any relationships, the target elements won’t be deleted, though.</p>

CC BY-SA 3.0
2017-11-05T14:24:47.793Z
To be clear – OP specifically mentions editing an entry – if you're deleting a Matrix block while editing an entry, the Matrix block (and it's data/content) won't _actually_ be deleted until you (re)save the entry.
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2017-11-05T18:40:38.397Z
@MatsMikkelRummelhoff Hm yeah ok, just clarified the answer.
Brandon Kelly
CC BY-SA 3.0
2017-11-05T11:16:03.397Z
2017-11-05T18:40:15.970Z
2017-11-05T18:40:15.970Z
Brandon Kelly
<p>If I delete the Matrix block content (while editing an entry) does the associated is deleted as well or only the block but its data still remains in db?</p>

<matrix><database><performance><optimization>
Deleted matrix block means deleted data?
# Deleted matrix block means deleted data?

(Asked by: username_0 on 2017-11-04)

If I delete the Matrix block content (while editing an entry) does the associated is deleted as well or only the block but its data still remains in db?

**Tags:** matrix, database, performance, optimization

---

## 1 answers

### Answer by username_1 on 2017-11-05. Score: 3 | Accepted answer

Any content or relationships that belong to the Matrix block will also be deleted, *when you save the entry*. If there were any relationships, the target elements won’t be deleted, though.

> **Comments:**
> **username_2**: To be clear – OP specifically mentions editing an entry – if you're deleting a Matrix block while editing an entry, the Matrix block (and it's data/content) won't _actually_ be deleted until you (re)save the entry.  
> **username_1**: @MatsMikkelRummelhoff Hm yeah ok, just clarified the answer.  

---

