Yes, reinserting is probably a bad idea. How complex is the xml structure, how many tables are involved when you ask for the existence of one element, which is reflected in the structure?
If this is complicated, perhaps you can create a checksum of your records or a hash of some attributes and values that uniquely identify the record and store this hash / checksum in an additional table in db, when you look for modified records you just calculate the hash / checksum and look for her in one table. Perhaps this even makes the request faster, depending on how expensive the hash calculation is.
source
share