Skip to content

Instantly share code, notes, and snippets.

View rafrippling7's full-sized avatar

Richard rafrippling7

  • Joined Apr 1, 2026
View GitHub Profile
@rafrippling7
rafrippling7 / o0011.json
Created April 9, 2026 14:44
HUB-89465: DocumentDB explain() output — owner query residual filter + blocking SORT on $or dashboard query
{
"isDeleted": false,
"createdAt": "2026-04-08T17:52:56.031000-07:53",
"updatedAt": "2026-04-08T17:52:56.032000-07:53",
"table": "(lp0\n(lp1\n(dp2\nVstage\np3\nVIXSCAN\np4\nsVverdict\np5\nV\\u2705 index scan\np6\nsVnReturned\np7\nV18\np8\nsVexecutionTimeMillis\np9\nV31.793\np10\nsVplanningTimeMillis\np11\nV0.041\np12\nsVindexes_used\np13\nVcompany_1_is_latest_version_1_trigger.a_340\np14\nsa(dp15\ng3\nVSORT\np16\nsg5\nV\\u26a0\\ufe0f blocking SORT (no index covers sort)\np17\nsg7\nV20\np18\nsg9\nV47.322\np19\nsg11\nV0.100\np20\nsg13\nVcompany_1_categories.category_name_1,company_1_sharing_grant_1,definition_id_1_version_status_1\np21\nsaa.",
"headers": [
"owner_query",
"or_query"
],
"logUrl": "",
@rafrippling7
rafrippling7 / v0011.py
Created April 9, 2026 14:44
HUB-89465: DocumentDB explain() webscript (v0011) — confirms missing indexes on workflow_definition for dashboard queries
# Draft v0011
# Created: 2026-04-08 13:52:43
# Summary: fix DocumentDB explain shape; both queries
"""
Investigation: MongoDB explain() on workflow_definition collection
Goal: Confirm COLLSCAN vs IXSCAN and execution stats for two slow queries
hitting workflow_definition using DocumentDB's actual explain() shape.
@rafrippling7
rafrippling7 / o0015.json
Created April 9, 2026 13:53
HUB-89486: OG API profiler output — GetCategoriesForRole 2494ms cold vs 81ms warm (30x improvement)
{
"isDeleted": false,
"createdAt": "2026-04-08T19:26:04.032000-07:53",
"updatedAt": "2026-04-08T19:26:04.032000-07:53",
"table": "(lp0\n(lp1\nV585c512df20db5063607e14a\np2\naV585c512df20db5063607e146\np3\na(dp4\nVget_categories_for_role\np5\nV{\"cold_ms\": 2493.7619240008644, \"warm_ms\": 80.97207399987383, \"count\": 454}\np6\nsVget_modules_for_category\np7\nV{\"cold_ms\": 246.18881300557405, \"warm_ms\": 80.67111299897078, \"count\": 1}\np8\nsVget_dynamic_virtual_edges\np9\nV{\"cold_ms\": 105.46592000173405, \"warm_ms\": 92.80153200234054}\np10\nsVget_fields_for_module\np11\nV{\"cold_ms\": 189.14162999863038, \"warm_ms\": 62.398864996794146, \"count\": 276}\np12\nsVget_module_for_model\np13\nV{\"cold_ms\": 72.64778399985516, \"warm_ms\": 60.59269600518746}\np14\nsVget_meta_for_rql_path\np15\nV{\"cold_ms\": 98.7944470034563, \"warm_ms\": 95.44610499870032}\np16\nsaa.",
"headers": [
"role_id",
"company_id",
"timing"
],
@rafrippling7
rafrippling7 / v0015.py
Created April 9, 2026 13:53
HUB-89486: OG API double-call profiler webscript (v0015) — cold vs warm latency for 5 segmented Object Graph endpoints
# Draft v0015
# Created: 2026-04-08
# Summary: Double-call profiling — measure upstream OG caching by calling each endpoint twice
"""
Investigation: Profile Segmented Object Graph API — Upstream Cache Effect
Approach: Call each endpoint TWICE in sequence. The first call is cold,
the second call may benefit from upstream OG service caching (Django/Redis
on the OG service side). We skip local Redis writes since the read-only