Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/thebengeu/simple-supabase-benchmarks


https://github.com/thebengeu/simple-supabase-benchmarks

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# Simple Supabase Benchmarks

## Prerequisites

- [k6](https://k6.io/docs/get-started/installation/)
- [pgbench](https://www.postgresql.org/docs/current/pgbench.html)
- [psql](https://www.postgresql.org/docs/current/app-psql.html)

## Setup

```console
export PGDATABASE=postgresql://postgres:@db..supabase.co:5432/postgres
pgbench --initialize --init-steps dtGvp --scale 200
psql $PGDATABASE .supabase.co
export SUPABASE_KEY=
psql $PGDATABASE -c 'set statement_timeout = 0' -c 'truncate pgbench_history' -c 'vacuum analyze' && k6 run simple-update.js
```

There are also:

- `select-only.js`, based on `pgbench --builtin select-only`.
- `tpcb-like.js`, based on `pgbench --builtin tpcb-like`.

## Cleanup

```console
pgbench --initialize --init-steps d
```