Skip to content

feat: database - enhance SOQL + DML limit visibility #162

Closed
2 of 2 issues completed
Closed

Description

@lcottercertinia

Is your feature request related to a problem?

I want to see different types of SOQL statement differently e.g custom metadata queries do not count towards limits unless in flow or includes a long text area field.

Describe the solution you'd like

  • include a limit cost column
  • Add the count badge at top e.g 10 (9/100) if 1 was cmdt. Or as separate badge.
  • include an object type in the column (mdt, e, c, standard etc.

The issue is that we can not tell if a mdt query includes a long text field. We could maybe compared against the cumulative limits, if included but that would simply tell us whether one contributed to soql limits and not which one.

The analysis view could have badges at the top to show the total number of soql, sosl, cpu, heap, dml etc.

I want someway of being able to see whether the query counted towards the overall soql limit (custom metadata records have unlimited queries) and possibly a break down or summary of per package. Maybe even showing the queries / dml that occurred but different ways to group that data e.g by namespace.

Perhaps we should shows the limits used above dml too.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered

Additional context

Add any other context or screenshots about the feature request here

Activity

  1. changed the title [-]feat: Separate different kinds of SOQL statement[/-] [+]feat: Separate different kinds of SOQL statement on DB view[/+] on Sep 30, 2022
  2. added
    enhancement
    on Nov 1, 2022
  3. changed the title [-]feat: Separate different kinds of SOQL statement on DB view[/-] [+]feat: Separate different kinds of SOQL statement on DB + analysis view[/+] on Dec 15, 2022
  4. modified the milestone: v1.20.0 on May 28, 2024
  5. changed the title [-]feat: Separate different kinds of SOQL statement on DB + analysis view[/-] [+]feat: database - enhance SOQL limit visibility[/+] on Feb 3, 2026
  6. changed the title [-]feat: database - enhance SOQL limit visibility[/-] [+]feat: database - enhance SOQL + DML limit visibility[/+] on Feb 3, 2026
  7. added this to the v1.22.0 milestone on Jun 30, 2026
  8. lukecotter commented on Jul 22, 2026

    @lukecotter
    Collaborator

    Implemented in #861.

    What shipped

    • Governor-limit overview strip (SOQL / SOSL / DML + query/DML rows as used / limit).
    • Per-section tracked vs consumed reconciliation — statements found in the log vs the governor-counted total (CUMULATIVE_LIMIT_USAGE), flagging counts that didn't consume the limit.
    • Object column + group-by on SOQL/DML (parser now captures DMLBeginLine.sObjectType).
    • New, searchable SOSL table (rows metered per query against the 2,000-per-query cap).
    • Redesigned, coherent Database tab (DML → SOQL → SOSL sections, collapsible, with the governor overview).

    What we couldn't fully do — log limitation
    The headline ask (mark each query as counting or not) can't be done definitively from the log for custom metadata (__mdt). __mdt SOQL is free unless the query selects a long text area field or runs in a Flow, and the log carries neither field types nor Flow context. Verified in an org:

    • Same __mdt object: Limits.getQueries() delta 0 without a long-text field, 1 when the long-text field is selected.
    • A transaction logged 6 SOQL but only 4 counted, with no per-statement signal of which.

    So __mdt is shown as Uncertain, and the section reconciliation shows the net counted total. Raised a Salesforce Idea to add per-statement (SOQL + DML) limit attribution to the debug log — which would let us show this precisely (please upvote): https://ideas.salesforce.com/s/idea/a0BHp000017Jly5MAC

    Known limitations / follow-ups

    • The counted totals (CUMULATIVE_LIMIT_USAGE) require the Apex Profiling log category; without it, sections show the tracked count and mark limits n/a.
    • Pre-existing: governor used is summed across namespaces while limit is a single namespace's value, so multi-namespace logs can display e.g. 119 / 100. Per-namespace limits aren't additive — flagged for a follow-up.
  9. added a commit that references this issue on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions