Skip to content

Profile Queries

After connecting your app to ReadySet, profile your app performance and identify queries to cache in ReadySet. Generally, it's best to focus on frequent queries that are too slow and/or that are putting unwanted load on your upstream database.

If you already have performance monitoring in place, use that tooling to identify queries that can benefit from caching in ReadySet. Otherwise, you can use ReadySet's own metrics endpoint to profile queries.

Enable ReadySet metrics

To enable ReadySet metrics, start ReadySet with the following options:

To include query-specific execution metrics, also pass:

Access ReadySet metrics

You can access ReadySet metrics at <metrics address>/metrics, where the metrics address is defined by the --metrics-address option (default:


When running ReadySet locally, you can usually access ReadySet metrics at in your browser.

Examine per-query metrics

ReadySet metrics are formatted for easy integration with Prometheus. However, the quickest way to examine per-query metrics is to use a simple metrics utility written in Python that queries the metrics endpoint and displays latencies for queries received by ReadySet.

  1. Download the metrics utility and its requirements.txt:

    curl -O ""
    curl -O ""
  2. Install dependencies for the utility:

    pip3 install -r requirements.txt
  3. Set the HOST environment variable to the IP address/hostname portion of --metrics-address:

    export HOST="<metrics-host>"
  4. Run the script with

    python3 --host=${HOST}

    You can filter the output of this script to show only queries displayed in SHOW PROXIED QUERIES or SHOW CACHES by passing the --filter-queries flag and piping the output of those ReadySet commands into the script like so:

    PGPASSWORD=noria psql --host= --port=5433 --username=postgres --dbname=noria -c "SHOW CACHES" | python3 --filter-queries