Repository navigation
GitHub Issue #1607: Return selectRows total count without the rows query - #8101
Merged
Merged
Conversation
…true as a count-only request
…tadata if requested
…(*) without a rows query
…talRowCount for LKS DataRegion.js
labkey-jeckels
approved these changes
Sep 28, 2026
… QC warning's all-results query - A count-only request (maxRows=0) sets showRows to NONE, so setMaxRows(ALL_ROWS) hit the "Can't set maxRows when not paginated" assertion.
cnathe
added a commit
to LabKey/labkey-ui-components
that referenced
this pull request
Sep 30, 2026
…ery (#2081) #### Rationale LabKey/internal-issues#1607 See platform PR for rationale #### Related Pull Requests - LabKey/platform#8101 - #2081 - LabKey/limsModules#2501 - LabKey/testAutomation#3215 #### Changes - withQueryModels.tsx update to reduce server side queries with the combination of maxRows 0 and includeTotalCount true
cnathe
added a commit
to LabKey/testAutomation
that referenced
this pull request
Sep 30, 2026
…ery (#3215) ## Rationale LabKey/internal-issues#1607 See platform PR for rationale ## Related Pull Requests - LabKey/platform#8101 - LabKey/labkey-ui-components#2081 - LabKey/limsModules#2501 - #3215 ## Changes - Test selectRows count-only requests
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.
Rationale
https://github.com/LabKey/internal-issues/issues/1607
In the app React grid, we are sending two API requests: one for the page of data and a second for the total row count. Because the total row count API call sends maxRows: 1, we are getting an extra LIMIT 2 query on the server side prior to the COUNT(*) query.
selectRows with maxRows=0 and an explicitly sent includeTotalCount=true now becomes a count-only request. The server runs only COUNT(*) (skipping the LIMIT 2 rows query) and returns rowCount, an empty rows list, and metadata only if asked for. loadTotalCount in withQueryModels now sends maxRows: 0 and includeMetadata: false.
Related Pull Requests
Changes