{
  "observed_at_utc": "2026-12-04T23:27:08.680840+00:00",
  "source_revision": "7cf4c75186389171151844cd741c81f62438fe70",
  "postgres": "PostgreSQL 17.11 (Debian 17.11-1.pgdg13+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit",
  "docker_image_id": "sha256:651ddcd1c769a6d94cf4aaca9756f2abb6acd65e712f4a386a2ff4e730586d5b",
  "limits": {
    "cpus": 1,
    "memory_mib": 768,
    "network": "none",
    "host_ports": "none"
  },
  "fixture": {
    "synthetic_articles": 600000,
    "workspaces": 5000,
    "actor_memberships": 10,
    "admin_memberships": 3,
    "query": "select id from public.kb_articles order by updated_at desc limit 20",
    "articles_per_workspace": 120,
    "published_distribution": "g % 3 = 0",
    "created_by": "NULL for all synthetic articles",
    "updated_at_distribution": "One bulk insert: all rows share the insert transaction timestamp. No realistic timestamp distribution was modelled."
  },
  "protocol": "Fresh disposable Postgres 17, copied sample migrations, minimal local auth schema/uid helper, no Supabase API or JWT verification. Two warmups per variant, seven alternating EXPLAIN ANALYZE TIMING OFF measurements each; query execution excludes network and frontend. This is a synthetic plan comparison, not an application or customer benchmark. PostgreSQL settings were not overridden; image defaults apply.",
  "results": {
    "subquery_in": {
      "semantics": {
        "role": "authenticated",
        "rls_active": true,
        "visible_rows": 640,
        "id_digest": "192687e70c752176fa5da35993374c95"
      },
      "outsider_visible_rows": 0,
      "warmup_runs": 2,
      "execution_ms": [
        64.03,
        65.128,
        62.617,
        62.538,
        64.388,
        63.103,
        62.6
      ],
      "planning_ms": [
        0.298,
        0.308,
        0.332,
        0.302,
        0.301,
        0.297,
        0.31
      ],
      "median_execution_ms": 63.103,
      "min_execution_ms": 62.538,
      "max_execution_ms": 65.128,
      "plan_nodes": [
        "Limit",
        "Result",
        "Sort",
        "Seq Scan on kb_articles",
        "ProjectSet",
        "Result",
        "ProjectSet",
        "Result"
      ]
    },
    "array_any": {
      "semantics": {
        "role": "authenticated",
        "rls_active": true,
        "visible_rows": 640,
        "id_digest": "192687e70c752176fa5da35993374c95"
      },
      "outsider_visible_rows": 0,
      "warmup_runs": 2,
      "execution_ms": [
        1.017,
        0.999,
        1.062,
        1.013,
        1.03,
        1.059,
        0.994
      ],
      "planning_ms": [
        0.346,
        0.348,
        0.362,
        0.353,
        0.342,
        0.335,
        0.332
      ],
      "median_execution_ms": 1.017,
      "min_execution_ms": 0.994,
      "max_execution_ms": 1.062,
      "plan_nodes": [
        "Limit",
        "ProjectSet",
        "Result",
        "ProjectSet",
        "Result",
        "Result",
        "Sort",
        "Bitmap Heap Scan on kb_articles",
        "BitmapOr",
        "Bitmap Index Scan",
        "Bitmap Index Scan"
      ]
    }
  },
  "case_url": "https://emphasoft.com/case-studies/multi-tenant-saas-supabase-ai-agents/",
  "measurement_scope": "Synthetic query-plan comparison in an anonymised reference port. Not customer traffic, end-to-end application latency, a live Supabase auth test, or a fresh full-suite coverage run."
}
