bethgrace5 / sequoia-grove

Angular JS / Java Spring Web Application to Assist Employee Scheduling
http://bethgrace5.github.io/sequoia-grove/
4 stars 3 forks source link

Determine if Is Scheduled sent to databse is update or insert before sending to back end. #61

Closed bethgrace5 closed 3 years ago

bethgrace5 commented 8 years ago

The list of schedule changes are mixed with update and insert. If we know the method in advance, we don't have to individually check each change, essentially worst case currently is 175 queries to the database (25*7), whereas if we know the operation, we can make one operation to batch insert and one operation to batch update. This makes the worst case 2 queries to the database - one for each type of operation.