Release Notes - v0.1.0
Release Date: 2023-09-04
v0.1.0 is the first release. It defines the Petstore pet table for MySQL and
adds two small commands that create the table and measure how fast pets can be
inserted, along with a Java example that does the same over JDBC.
Highlights
- Pet Table - The Petstore
pettable, as a SQL definition and as a Go function,models.CreatePetTable, that creates it in a MySQL database. - Table and Insert Tools -
create_tablescreates the table in a named database, andcreate_petsinserts pets and reports how long they took, so the same workload can be compared across MySQL versions and instance sizes. - Java Example - A JBang script inserts pets through JDBC, for comparing a Java client with the Go one.
What's Included
The Table
models/create_pet.sql defines the pet table: an auto-increment id, a
name, a description, a status, acquisition and birth dates and times,
creation and update times, and a category_id. The SQL is embedded in the
models package, and CreatePetTable(db) runs it.
The Commands
go run ./models/cmd/create_tables -t <environment>
go run ./models/cmd/create_pets -t <environment> -i 1000
-t names the database to use, and -i is the number of pets to insert
(10 by default). create_pets prints the host, the server version, the row
count, the elapsed time and the duration in minutes.
The Java Example
models/cmd/create_pets/main.java connects with JDBC and inserts pets,
reporting the same timings.
Full Changelog
See CHANGELOG.md for the complete list of changes.