feat(database): governor-limit visibility, SOSL table, redesigned tab (#162)#861
Merged
lcottercertinia merged 3 commits intoJul 22, 2026
Conversation
…certinia#162) Surface which SOQL/DML consume governor limits and add first-class SOSL support. SOQL/DML: - Derive and show the queried SObject (Object column, default) so custom metadata (__mdt) is visible — those queries may be free (they don't count toward the SOQL limit unless they select a long text area field or run in a Flow, which the log can't confirm). - Per-section reconciliation: Found (in log) vs Counted (CUMULATIVE_LIMIT_USAGE) with a delta, since per-query certainty isn't possible from the log alone. - Group by Object / Namespace / Caller Namespace on both tables. - Parser: structured DMLBeginLine.sObjectType (from the Type: field). SOSL (new): - getSOSLLines, searchable SOSLView, SOSL_VIEWS + database.sosl setting, and cross-table find routing (SOQL/DML/SOSL). Rows metered per query vs the 2,000-row cap; the section meters total vs the derived 20 x 2,000 ceiling. Redesigned Database tab: - Governor overview strip (DML/SOQL/SOSL + query/DML rows) with used/limit gauges. - Ordered DML -> SOQL -> SOSL sections, each an accent-headed collapsible panel (empty types auto-collapse) with inline tracked-vs-consumed metric stats on a shared left inset; 'limit n/a' when cumulative limits aren't logged. - limits.ts documents the governor numbers + doc URL for future reference.
…elog (certinia#162) - README: Database Analysis covers the governor overview strip, tracked-vs-consumed reconciliation, the searchable SOSL table, and the Object column / group-by. Screenshot flagged for re-capture. - docs site: database page gains a Governor limits section and refreshed Column Views + Group sections. - CHANGELOG: merge the overlapping certinia#162/certinia#298 entries into one; order the Unreleased section by impact (Changed now leads with the vscode-elements migration, cosmetic styling last).
…ertinia#162) The SOSL Rows card invented a 40,000 ceiling (soslQueries.limit || 20 × 2,000) and rendered a live bar even when the log had no CUMULATIVE_LIMIT_USAGE. - extract `soslRowsMetric` into limits.ts: derives the ceiling from the SOSL-query limit and returns `used: null` / no ceiling when no snapshot, so the card shows "limit n/a" like every sibling metric - DatabaseView routes the SOSL Rows metric through the helper and `_hasLimits`, replacing the `|| 20` fallback that masked a real limit of 0 - reword the "limit n/a" tooltip; cover the helper with unit tests
lcottercertinia
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 PR Overview
Reworks the Database tab to answer the core question in #162 — which SOQL/DML actually consume governor limits — and adds first-class SOSL support with a redesigned, coherent layout.
Not every SOQL query counts (custom metadata is free unless it selects a long text area field or runs in a Flow; cached custom settings issue no query). The log records the statements and cumulative totals but never per-statement attribution, so the tab surfaces the honest signal: the queried Object per row plus a per-section tracked vs consumed reconciliation, backed by a governor-limit overview.
🛠️ Changes made
used / limit, coloured as they approach the limit.CUMULATIVE_LIMIT_USAGE), flagging queries that didn't count.DMLBeginLine.sObjectType.limit n/awhen cumulative limits aren't logged.database/limits.tsdocuments the governor numbers + doc URL for future reference.🧩 Type of change (check all applicable)
📷 Screenshots / gifs / video [optional]
🔗 Related Issues
closes #162
✅ Tests added?
📚 Docs updated?
Anything else we need to know? [optional]
__mdt) SOQL is marked Uncertain — whether it counts depends on selecting a long text area field or running in a Flow, which the debug log doesn't expose. Verified in an org (same object:Limits.getQueries()delta0without the long-text field,1with it). Raised a Salesforce Idea for per-statement limit attribution: https://ideas.salesforce.com/s/idea/a0BHp000017Jly5MACaddGovernorLimitssumsusedacross namespaces but reports a single namespace'slimit, so multi-namespace logs can render e.g.119 / 100. Per-namespace limits aren't additive — flagged for a follow-up.