Skip to main content
The statistics endpoint provides insight into the database and system health.

Get Database Size

GET
Get database size statistics broken down by table.

Example

curl "https://poly-data.xyz/stats/db-size"
Response:
{
  "database": "defaultdb",
  "size_bytes": 5368709120,
  "size_pretty": "5.00 GB",
  "tables": [
    {
      "table": "orderbooks",
      "size_bytes": 4294967296,
      "size_pretty": "4.00 GB"
    },
    {
      "table": "markets",
      "size_bytes": 536870912,
      "size_pretty": "512.00 MB"
    },
    {
      "table": "events",
      "size_bytes": 268435456,
      "size_pretty": "256.00 MB"
    },
    {
      "table": "outcomes",
      "size_bytes": 134217728,
      "size_pretty": "128.00 MB"
    }
  ]
}

Response Fields

FieldTypeDescription
databasestringDatabase name
size_bytesintegerTotal database size in bytes
size_prettystringHuman-readable total size
tablesarrayPer-table size breakdown

Table Object

FieldTypeDescription
tablestringTable name
size_bytesintegerTable size in bytes
size_prettystringHuman-readable table size
The orderbooks table typically accounts for the vast majority of database size due to the volume of historical snapshots.