🏋️ dbbench is a simple database benchmarking tool which supports several databases and own scripts

dbbench

Action Go Report Card Coverage Status

Table of Contents

Description

dbbench is a simple tool to benchmark or stress test databases. You can use the simple built-in benchmarks or run your own queries.

Attention: This tool comes with no warranty. Don't run it on production databases.

Example

$ dbbench postgres --user postgres --pass example --iter 100000
inserts 6.199670776s    61996   ns/op
updates 7.74049898s     77404   ns/op
selects 2.911541197s    29115   ns/op
deletes 5.999572479s    59995   ns/op
total: 22.85141994s

Installation

Precompiled Binaries

Binaries are available for all major platforms. See the releases page. Unfortunately, cgo is disabled for these builds, which means there is no SQLite support (#1).

Homebrew

Using the Homebrew package manager for macOS:

brew install sj14/tap/dbbench

Manually

It's also possible to install the current development snapshot with go get (not recommended):

go get -u github.com/sj14/dbbench/cmd/dbbench

Supported Databases / Driver

Databases Driver
Cassandra and compatible databases (e.g. ScyllaDB) github.com/gocql/gocql
MS SQL and compatible databases (no built-in benchmarks yet) github.com/denisenkom/go-mssqldb
MySQL and compatible databases (e.g. MariaDB and TiDB) github.com/go-sql-driver/mysql
PostgreSQL and compatible databases (e.g. CockroachDB) github.com/lib/pq
SQLite3 and compatible databases github.com/mattn/go-sqlite3

Usage

Available subcommands:
        cassandra|cockroach|mssql|mysql|postgres|sqlite
        Use 'subcommand --help' for all flags of the specified command.
Generic flags for all subcommands:
      --clean            only cleanup benchmark data, e.g. after a crash
      --iter int         how many iterations should be run (default 1000)
      --noclean          keep benchmark data
      --noinit           do not initialize database and tables, e.g. when only running own script
      --run string       only run the specified benchmarks, e.g. "inserts deletes" (default "all")
      --script string    custom sql file to execute
      --sleep duration   how long to pause after each single benchmark (valid units: ns, us, ms, s, m, h)
      --threads int      max. number of green threads (iter >= threads > 0) (default 25)
      --version          print version information

Custom Scripts

You can run your own SQL statements with the --script flag. You can use the auto-generate tables. Beware the file size as it will be completely loaded into memory.

The script must contain valid SQL statements for your database.

There are some built-in variables and functions which can be used in the script. It's using the golang template engine which uses the delimiters {{ and }}. Functions are executed with the call command and arguments are passed after the function name.

Benchmark Settings

A new benchmark is created with the \benchmark keyword, followed by either once or loop. Optional parameters can be added afterwards in the same line.

The the usage description and the example subsection for more information.

Usage Description
\benchmark once Execute the following statements (lines) only once (e.g. to create and delete tables).
\benchmark loop Default mode. Execute the following statements (lines) in a loop. Executes them one after another and then starts a new iteration. Add another \benchmark loop to start another benchmark of statements.
\name insert Set a custom name for the DB statement(s), which will be output instead the line numbers (insert is an examplay name).

Statement Substitutions

Usage Description
{{.Iter}} The iteration counter. Will return 1 when \benchmark once.
{{call .Seed 42}} godoc (42 is an examplary seed)
{{call .RandInt63}} godoc
{{call .RandInt63n 9999}} godoc (9999 is an examplary upper limit)
{{call .RandFloat32}} godoc
{{call .RandFloat64}} godoc
{{call .RandExpFloat64}} godoc
{{call .RandNormFloat64}} godoc

Example

Exemplary sqlite_bench.sql file:

-- Create table
\benchmark once \name init
CREATE TABLE dbbench_simple (id INT PRIMARY KEY, balance DECIMAL);

-- How long takes an insert and delete?
\benchmark loop \name single
INSERT INTO dbbench_simple (id, balance) VALUES({{.Iter}}, {{call .RandInt63}});
DELETE FROM dbbench_simple WHERE id = {{.Iter}}; 

-- How long takes it in a single transaction?
\benchmark loop \name batch
BEGIN TRANSACTION;
INSERT INTO dbbench_simple (id, balance) VALUES({{.Iter}}, {{call .RandInt63}});
DELETE FROM dbbench_simple WHERE id = {{.Iter}}; 
COMMIT;

-- Delete table
\benchmark once \name clean
DROP TABLE dbbench_simple;

In this script, we create and delete the table manually, thus we will pass the --noinit and --noclean flag, which would otherwise create this default table for us:

dbbench sqlite --script scripts/sqlite_bench.sql --iter 5000 --noinit --noclean

output:

(once) init:    3.404784ms      3404784 ns/op
(loop) single:  10.568390874s   2113678 ns/op
(loop) batch:   5.739021596s    1147804 ns/op
(once) clean:   1.065703ms      1065703 ns/op
total: 16.312319959s

Troubleshooting

Error message

failed to insert: UNIQUE constraint failed: dbbench_simple.id

Description The previous data wasn't removed (e.g. because the benchmark was canceled). Try to run the same command again, but with the --clean flag attached, which will remove the old data. Then run the original command again.


Error message

failed to create table: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

Description
Currently, the released binary builds don't contain SQLite support. You have to compile dbbench manually, either from the particular release source code (recommended) or from the current master branch (not recommended).

Development

Below are some examples how to run different databases and the equivalent call of dbbench for testing/developing.

Cassandra

docker run --name dbbench-cassandra -p 9042:9042 -d cassandra:latest
dbbench cassandra

CockroachDB

# port 8080 is the webinterface (optional)
docker run --name dbbench-cockroach -d -p 26257:26257 -p 8080:8080 cockroachdb/cockroach:latest start --insecure
dbbench cockroach

Microsoft SQL Server

docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 -d microsoft/mssql-server-linux
dbbench mssql -user sa -pass 'yourStrong(!)Password'

MariaDB

docker run --name dbbench-mariadb -p 3306:3306 -d -e MYSQL_ROOT_PASSWORD=root mariadb
dbbench mariadb

MySQL

docker run --name dbbench-mysql -p 3306:3306 -d -e MYSQL_ROOT_PASSWORD=root mysql
dbbench mysql

PostgreSQL

docker run --name dbbench-postgres -p 5432:5432 -d postgres
dbbench postgres --user postgres --pass example

ScyllaDB

docker run --name dbbench-scylla -p 9042:9042 -d scylladb/scylla
dbbench scylla

SQLite

dbbench sqlite

TiDB

git clone https://github.com/pingcap/tidb-docker-compose.git
cd tidb-docker-compose && docker-compose pull
docker-compose up -d
dbbench tidb --pass '' --port 4000

Acknowledgements

Thanks to the authors of Go and those of the directly and indirectly used libraries, especially the driver developers. It wouldn't be possible without all your work.

This tool was highly inspired by the snippet from user Fale and the tool pgbench. Later, also inspired by MemSQL's dbbench which had the name and a similar idea before.

Owner
Simon Jürgensmeyer
Simon Jürgensmeyer
Comments
  • Feature/addl metrics

    Feature/addl metrics

    Addresses #12

    Proposed Changes

    • Wrap the benchmarker execution in a "bencherExecutor" struct to aggregate some additional metrics from the benchmark.
    • Return a Results struct from the benchmark run instead of just the duration
    • Modify the formatting of the metrics displayed via std out after the run:
    Name: updates
      total time: 313.223421ms
      total database operations: 990
      database operations per second: 3160.6831853100794
      nanoseconds per operation: 313223 ns/op
      per-request: 
            min: 1.986272ms
            max: 23.62259ms
            avg: 7.348066ms
    
  • Bump google.golang.org/api from 0.75.0 to 0.80.0

    Bump google.golang.org/api from 0.75.0 to 0.80.0

    Bumps google.golang.org/api from 0.75.0 to 0.80.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.80.0

    0.80.0 (2022-05-17)

    Features

    v0.79.0

    0.79.0 (2022-05-10)

    Features

    v0.78.0

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    v0.77.0

    0.77.0 (2022-04-29)

    Features

    v0.76.0

    0.76.0 (2022-04-26)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.80.0 (2022-05-17)

    Features

    0.79.0 (2022-05-10)

    Features

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    0.77.0 (2022-04-29)

    Features

    0.76.0 (2022-04-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.75.0 to 0.79.0

    Bump google.golang.org/api from 0.75.0 to 0.79.0

    Bumps google.golang.org/api from 0.75.0 to 0.79.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.79.0

    0.79.0 (2022-05-10)

    Features

    v0.78.0

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    v0.77.0

    0.77.0 (2022-04-29)

    Features

    v0.76.0

    0.76.0 (2022-04-26)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.79.0 (2022-05-10)

    Features

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    0.77.0 (2022-04-29)

    Features

    0.76.0 (2022-04-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump cloud.google.com/go/spanner from 1.31.0 to 1.32.0

    Bump cloud.google.com/go/spanner from 1.31.0 to 1.32.0

    Bumps cloud.google.com/go/spanner from 1.31.0 to 1.32.0.

    Release notes

    Sourced from cloud.google.com/go/spanner's releases.

    bigquery: v1.32.0

    1.32.0 (2022-05-06)

    Features

    • bigquery: add interval support (#5907) (9e979c9)
    • bigquery: expose connections and schema autodetect modifier (#5739) (c72e34f)

    spanner: v1.32.0

    1.32.0 (2022-05-09)

    Features

    • spanner/spansql: support DEFAULT keyword (#5932) (49c19a9)
    • spanner/spansql: support JSON literals (#5968) (b500120)
    • spanner: enable row.ToStructLenient to work with STRUCT data type (#5944) (bca8d50)
    Commits
    • 13ef5c0 chore(main): release spanner 1.32.0 (#5948)
    • 601442a fix: copy string tokens to prevent overwriting ptr (#5971)
    • b500120 feat(spanner/spansql): support JSON literals (#5968)
    • dbfdf76 fix(pubsub): disable deprecated BufferedByteLimit when using MaxOutstandingBy...
    • 54bcb16 chore(main): release bigquery 1.32.0 (#5980)
    • db9991f feat(datastore): adds in, not-in, and != query operations (#5975)
    • 32ddf80 docs(compute): update metadata docs link (#6011)
    • 41540c4 feat(workflows): start generating apiv1 (#6008)
    • 1084ab1 feat(notebooks): start generating apiv1 (#6004)
    • 0c9e0f9 feat(datastream): start generating apiv1 (#6003)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.75.0 to 0.78.0

    Bump google.golang.org/api from 0.75.0 to 0.78.0

    Bumps google.golang.org/api from 0.75.0 to 0.78.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.78.0

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    v0.77.0

    0.77.0 (2022-04-29)

    Features

    v0.76.0

    0.76.0 (2022-04-26)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.78.0 (2022-05-03)

    Features

    • all: auto-regenerate discovery clients, refs #1530 #1527

    0.77.0 (2022-04-29)

    Features

    0.76.0 (2022-04-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.75.0 to 0.77.0

    Bump google.golang.org/api from 0.75.0 to 0.77.0

    Bumps google.golang.org/api from 0.75.0 to 0.77.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.77.0

    0.77.0 (2022-04-29)

    Features

    v0.76.0

    0.76.0 (2022-04-26)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.77.0 (2022-04-29)

    Features

    0.76.0 (2022-04-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.75.0 to 0.76.0

    Bump google.golang.org/api from 0.75.0 to 0.76.0

    Bumps google.golang.org/api from 0.75.0 to 0.76.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.76.0

    0.76.0 (2022-04-26)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.76.0 (2022-04-26)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.70.0 to 0.72.0

    Bump google.golang.org/api from 0.70.0 to 0.72.0

    Bumps google.golang.org/api from 0.70.0 to 0.72.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.72.0

    0.72.0 (2022-03-14)

    Features

    v0.71.0

    0.71.0 (2022-03-08)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.72.0 (2022-03-14)

    Features

    0.71.0 (2022-03-08)

    Features

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.70.0 to 0.71.0

    Bump google.golang.org/api from 0.70.0 to 0.71.0

    Bumps google.golang.org/api from 0.70.0 to 0.71.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.71.0

    0.71.0 (2022-03-08)

    Features

    Changelog

    Sourced from google.golang.org/api's changelog.

    0.71.0 (2022-03-08)

    Features

    Commits
    • 3d588dd chore(main): release 0.71.0 (#1454)
    • 937d36f feat(all): auto-regenerate discovery clients (#1469)
    • 33ba990 feat(internal/gensupport): add net.ErrClosed to default retry (#1462)
    • bf3225e feat(all): auto-regenerate discovery clients (#1467)
    • 94d6c1d chore(all): update google.golang.org/genproto commit hash to 325a892 (#1468)
    • 76a2c21 feat(all): auto-regenerate discovery clients (#1466)
    • 398f9e8 feat(all): auto-regenerate discovery clients (#1465)
    • e8805bc feat(all): auto-regenerate discovery clients (#1464)
    • 4df1039 feat(all): auto-regenerate discovery clients (#1463)
    • 7331451 feat(all): auto-regenerate discovery clients (#1457)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump google.golang.org/api from 0.68.0 to 0.69.0

    Bump google.golang.org/api from 0.68.0 to 0.69.0

    Bumps google.golang.org/api from 0.68.0 to 0.69.0.

    Release notes

    Sourced from google.golang.org/api's releases.

    v0.69.0

    0.69.0 (2022-02-15)

    Features

    Bug Fixes

    • gensupport: cover ChunkRetryDeadline edge case (#1430) (ef89845)
    • internal/kokoro: path to module root to run discogen (#1433) (4499c41)
    Changelog

    Sourced from google.golang.org/api's changelog.

    0.69.0 (2022-02-15)

    Features

    Bug Fixes

    • gensupport: cover ChunkRetryDeadline edge case (#1430) (ef89845)
    • internal/kokoro: path to module root to run discogen (#1433) (4499c41)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump cloud.google.com/go/spanner from 1.24.0 to 1.24.1

    Bump cloud.google.com/go/spanner from 1.24.0 to 1.24.1

    Bumps cloud.google.com/go/spanner from 1.24.0 to 1.24.1.

    Release notes

    Sourced from cloud.google.com/go/spanner's releases.

    spanner spanner/v1.24.1

    Bug Fixes

    • spanner/spansql: only add comma after other option (#4551) (3ac1e00)
    • spanner: allow decoding null values to spanner.Decoder (#4558) (45ddaca), refs #4552
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Cant connect to remote postgresql server

    Cant connect to remote postgresql server

    There is no option to specify the database name for connectiong with a remote postgresql server:

    $ dbbench postgres --host "172.24.1.63/mydbname" --port 5439 --user my_user --pass my_password  --iter 10 --threads 2 --conns 2 --sleep 5s --script website-benchmark.sql
    2019/10/25 19:13:15 failed to ping db: dial tcp: lookup 172.24.1.63/mydbname: no such host
    
    $ dbbench postgres --host 172.24.1.63 --port 5439 --user my_user --pass my_password  --iter 10 --threads 2 --conns 2 --sleep 5s --script website-benchmark.sql
    2019/10/25 19:13:27 failed to ping db: pq: database "my_user" does not exist
    

    Notice that also ping is disabled by network admin:

    $ ping 172.24.1.63
    PING 172.24.1.63 (172.24.1.63) 56(84) bytes of data.
    ^C
    --- 172.24.1.63 ping statistics ---
    10 packets transmitted, 0 received, 100% packet loss, time 9224ms
    

    What I missed is some command line options:

    1. --no-ping flag for skipping ping connection test
    2. --connectionoption for connecting using go pg connectionstring directly and also could be used instead of --host --port --user --pass
  • Connection issues with DBs inside Docker on Linux

    Connection issues with DBs inside Docker on Linux

    After enough iteration, the connection gets unintentionally closed. Might be a Docker bug on Linux.

    MySQL and MariaDB

    [mysql] 2018/12/16 14:33:08 packets.go:36: unexpected EOF
    2018/12/16 14:33:08 INSERT INTO dbbench.simple (id, balance) VALUES( 9458, 3611810842); failed: driver: bad connection
    

    PostgreSQL

    2018/12/16 13:53:19 DELETE FROM dbbench.simple WHERE id = 56669; failed: read tcp 127.0.0.1:42836->127.0.0.1:5432: read: connection reset by peer
    
  • Generate random string values in templates

    Generate random string values in templates

    This tool would be more useful to me if it was capable of generating things like names and addresses to benchmark on more realistic data.

    Would you accept a PR adding a fake data generation library dependency and some new template functions to go with it?

A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management

ploto A go Library for scan database/sql rows to struct、slice、other types. And it support multiple databases connection management It's not an ORM. wo

Nov 3, 2022
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.

OctoSQL OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases, streaming sources and file formats using

Dec 29, 2022
Redis-shake is a tool for synchronizing data between two redis databases. Redis-shake是一个用于在两个redis之间同步数据的工具,满足用户非常灵活的同步、迁移需求。
Redis-shake is a tool for synchronizing data between two redis databases. Redis-shake是一个用于在两个redis之间同步数据的工具,满足用户非常灵活的同步、迁移需求。

RedisShake is mainly used to synchronize data from one redis to another. Thanks to the Douyu's WSD team for the support. 中文文档 English tutorial 中文使用文档

Dec 29, 2022
SQL API is designed to be able to run queries on databases without any configuration by simple HTTP call.

SQL API SQL API is designed to be able to run queries on databases without any configuration by simple HTTP call. The request contains the DB credenti

Dec 2, 2022
A simple auditor of SQL databases.

DBAuditor SQL数据库审计系统,目前支持SQL注入攻击审计 环境配置 sudo apt install golang 运行方式 将待审计语句填入test.txt中,然后运行主程序: 直接运行: go run main.go 编译运行: go build main.go ./main 主要目

Nov 9, 2022
A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL
A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL

query2metric A tool to run db queries in defined frequency and expose the count as prometheus metrics. Why ? Product metrics play an important role in

Jul 1, 2022
Devcloud-go provides a sql-driver for mysql which named devspore driver and a redis client which named devspore client,

Devcloud-go Devcloud-go provides a sql-driver for mysql which named devspore driver and a redis client which named devspore client, you can use them w

Jun 9, 2022
Use SQL to instantly query instances, networks, databases, and more from Scaleway. Open source CLI. No DB required.
Use SQL to instantly query instances, networks, databases, and more from Scaleway. Open source CLI. No DB required.

Scaleway Plugin for Steampipe Use SQL to query infrastructure servers, networks, databases and more from your Scaleway project. Get started → Document

Nov 16, 2022
Manage SQL databases, users and grant using kubernetes manifests

SqlOperator Operate sql databases, users and grants. This is a WIP project and should not at all be used in production at this time. Feel free to vali

Nov 28, 2021
Use SQL to query databases, logs and more from PlanetScale

Use SQL to instantly query PlanetScale databases, branches and more. Open source CLI. No DB required.

Sep 30, 2022
Cross-platform client for PostgreSQL databases

pgweb Web-based PostgreSQL database browser written in Go. Overview Pgweb is a web-based database browser for PostgreSQL, written in Go and works on O

Dec 30, 2022
Universal command-line interface for SQL databases

usql A universal command-line interface for PostgreSQL, MySQL, Oracle Database, SQLite3, Microsoft SQL Server, and many other databases including NoSQ

Jan 9, 2023
Go sqlite3 http vfs: query sqlite databases over http with range headers

sqlite3vfshttp: a Go sqlite VFS for querying databases over http(s) sqlite3vfshttp is a sqlite3 VFS for querying remote databases over http(s). This a

Dec 27, 2022
The open-source collaborative IDE for your databases.
The open-source collaborative IDE for your databases.

The open-source collaborative IDE for your databases in your browser. About Slashbase is an open-source collaborative IDE for your databases in your b

Sep 4, 2022
Cross-platform client for PostgreSQL databases

pgweb Web-based PostgreSQL database browser written in Go. Overview Pgweb is a web-based database browser for PostgreSQL, written in Go and works on O

Dec 30, 2022
test ALL the databases

This project is an integration test, testing various Go database drivers (for the database/sql package). To run these tests, in this directory, run:

Dec 12, 2022
Manage Schema for KubeDB managed Databases

schema-manager Manage Schema for KubeDB managed Databases Installation To install KubeDB, please follow the guide here. Using KubeDB Want to learn how

Feb 19, 2022
SQLite extension for accessing other SQL databases

dblite SQLite extension for accessing other SQL databases, in SQLite. Similar to how Postgres Foreign Data Wrappers enable access to other databases i

Dec 23, 2022