How do multi database updates work

Hi everyone, so a simple question, how do multi database updates work in the background.

Example, I have a query that gives 10 results for example, each repeated row has 3 fields in it.
I have a multi database update form surrounding the whole thing, and after I have made changes to any of the 30 fields presented and hit update, it updates in my database perfectly.

So now my question, lets say i only update one of the 30 fields and hit update, does it still update all 30 fields but just with replaced duplicate data, or does it somehow know that I only altered one field on row 3 so it only has to update a single record.

Checking before I use this functionality on my next table that has many many more fields of data?

Paul - instead of giving an enormous cryptic technical solution that you would like to improve, that takes us half an hour to decrypt and guess what you mean, maybe try a practical example of what are you trying to achieve :slight_smile:

1 Like

I have a multi database update that is working perfectly.

I would like to know if I had to use this same working solution on a page that had hundreds of fields if there would be a performance impact.

Does to multi database update only update fields where data has been changed or does it update every piece of data that is inside that single form?

I hope I am making this clear enough.

I will try give an example
I have 3 rows in my database with 2 columns of data
A query populates a table on my website and each piece of data is placed in a form input

id animal colour
1 dog brown
2 cat white
3 pig pink

If all this is wrapped in a form element and each piece of data is in their own text input and I change a single value of brown to black and press the update button to run the multi database update server action.

Does it only send the data to the server to change brown to black for row ID 1
or does it send every piece of data from every input field to the database for update even if the data is the same as it already was.

You need just to submit the elements that are changed. So no not make the the whole table editable but just per row.

1 Like