I am currently using mattn's go-sqlite3 package and am looking to do many select statement searches with LIKE '%word%' conditions. Is mattn's regexp extension faster than the sqlite's built in LIKE operator? (more specifically for LIKE '%word%' searches)
The mattn/go-sqlite3
project itself has already quite a few example of SELECT
benchmarks
func BenchmarkRows(b *testing.B) {
db.once.Do(makeBench)
for n := 0; n < b.N; n++ {
var n sql.NullString
var i int
var f float64
var s string
var t time.Time
r, err := db.Query("select * from bench")
if err != nil {
panic(err)
}
...
}
You can adapt them for your specific tests.