Is it expected that this batch operation makes 100 write queries, not 1 (displayed in Dashboard's DB

Is it expected that this batch operation makes 100 write queries, not 1 (displayed in Dashboard's DB Metrics)?

var batch_arr = []; const delete_r = env.DB.prepare("DELETE FROM table"); batch_arr.push(delete_r); const stmt = env.DB.prepare("INSERT INTO table (n, v) VALUES (?1, ?2)"); for(var i = 0; i < 100; i++) { batch_arr.push(stmt.bind( i, 'str' )); } const batch = await env.DB.batch(batch_arr);
Was this page helpful?