Updating database via input fields live

I have a template repeater which displays a bunch of numerical fields horizontally as a row repeated for each day for the last 30 days of each site a user has selected. This uses the database mode to query the values for each row. I made it so you can input a new value and it would do a SQL Update through a scripting function on each field.

It works, and I’m using the propertyChange event handler with the proper "if event.propertyName == ‘floatValue’: , but the problem is that it’s doing too many queries each time a user selects a new site which freezes the client for some seconds. When a user changes a site, the fields changes to the new values, and it must be triggering the update, but is not incorrectly changing data in the db.

*Edit to add: I’m not sure if using the SQL Query Binding using the scalar query update would work in a template repeater. How would this react when switching from one site to another, whereas the values in each field would update to represent the new site’s values, would this trigger the SQL Query Binding?

What’s the best way to handle this while still updating the fields live?