Selectosaur is a CLI tool. It runs SQL queries on Timescale DB based on user-supplied parameters and outputs stats for them.
Build
It is recommended that you build this app on a 64-bit Mac or Linux machine with Golang version 1.17.
Clone this repo on to your system
Navigate to the root directory of this project and run go build to generate the binary. Alternatively, download a binary suitable for your platform from the Releases page.
Ensure that the binary has execution permissions on your system. For Linux/MaxOS, you can run chmod +x ./selectosaur.
Test the binary by invoking ./selectosaur -h. This should display the main help message of the CLI.
Run
Ensure that your query params CSV file query_params.csv is in the same directory as the CLI.
Run the below commands:
# NOTE: this is a temp timescale DB cluster which will be taken down soon. Enjoy for now.
export DB_CONNECTION_STRING="postgres://tsdbadmin:ha43nao4zo8ssg17@ixseujmyj1.rmdomcteja.tsdb.cloud.timescale.com:31703/tsdb?sslmode=require"
$ ./selectosaur --qp query_params.csv --worker-count 10
Total number of queries run: 49
Number of failures: 0
Total time across all queries: 86.034000 ms
Average query time: 1.755796 ms
Minimum query time: 1.397000 ms
Maximum query time: 3.270000 ms
Median query time: 1.502000 ms