An open API service indexing awesome lists of open source software.

https://github.com/si3nloong/sql-toxic-queries

Benchmark on toxic queries
https://github.com/si3nloong/sql-toxic-queries

benchmark go sql toxic-query

Last synced: about 1 year ago
JSON representation

Benchmark on toxic queries

Awesome Lists containing this project

README

          

# Toxic Queries

> This is an experiment to test how slow can a toxic query be.

## Setup

Machine: Macbook Pro


CPU: M1 Max


Memory: 32GB


OS: macOS Monterey


Record set: 500,000

## Benchmarks

| Statement | Operation |
| ---------------------- | --------------- |
| COUNT with \* | 0.009784 ns/op |
| COUNT with Primary Key | 0.01063 ns/op |
| COUNT with Explain | 0.0001766 ns/op |

| Statement | Operation |
| ---------------------- | ------------- |
| LIKE with Leading % | 0.1275 ns/op |
| LIKE without Leading % | 0.09251 ns/op |

| Statement | Operation |
| ----------------------- | ------------------ |
| Offset Based Pagination | 204339916750 ns/op |
| Cursor Based Pagination | 1339252750 ns/op |

| Statement | Operation |
| ---------------------------- | --------------- |
| INSERT with Stored Procedure | 0.0002593 ns/op |
| INSERT | 0.0001896 ns/op |