How exactly does a write to data store work in the background?
- For a single row, it will surely run 1 insert query, what happens when the data is an array? for each row will it run a single query or multiple ones?
Discussion posts and replies are publicly visible
AFAIK, it uses insert query with ON DUPLICATE KEY UPDATE. See below sample:
INSERT INTO player (name, age) VALUES ('Sachin', 42), ('Dhone', 40), ('Virat', 30)ON DUPLICATE KEY UPDATE age = VALUES(age)
Syntex may vary based on the Database and its versions.