Is there any significant performance difference between the
func (db *DB) Query(query string, args ...interface{}) (*Rows, error)
and the
func (db *DB) QueryRow(query string, args ...interface{}) *Row
in the "database/sql"
package even if you have LIMIT 1;
at the end of your query?
The difference is the overhead of a function call (i.e., almost nothing, compared to sending a query to your database). QueryRow calls Query, and then wraps the results in an sql.Row.