at https://issues.apache.org/jira/browse/GROOVY-9676
See attachment to this bug for test details and measurements.
From: Mike M
Sent: 01 August 2020 08:29
To: users@groovy.apache.org
Subject: SQL: Bind variables in INSERT statement resulting in extra SELECT
statement
A statement such as:
String qry = "INSERT INTO Author (firstname, lastname) VALUES ('$name',
'$name')"
sql.execute qry
results in one database roundtrip, as one would expect.
Using bind variables such as this:
sql.execute "INSERT INTO Author (firstname, lastname) VALUES ($fname, $lname)"