Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
57e20d13
Commit
57e20d13
authored
Apr 05, 2021
by
Alina Mihaila
Committed by
Craig Norris
Apr 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document add hardening method
parent
c15a9109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
doc/development/usage_ping/index.md
doc/development/usage_ping/index.md
+23
-3
No files found.
doc/development/usage_ping/index.md
View file @
57e20d13
...
@@ -214,11 +214,12 @@ For GitLab.com, there are extremely large tables with 15 second query timeouts,
...
@@ -214,11 +214,12 @@ For GitLab.com, there are extremely large tables with 15 second query timeouts,
|
`merge_request_diff_files`
| 1082 |
|
`merge_request_diff_files`
| 1082 |
|
`events`
| 514 |
|
`events`
| 514 |
We have several batch counting methods availabl
e:
The following operation methods are available for your us
e:
-
[
Ordinary Batch Counters
](
#ordinary-batch-counters
)
-
[
Ordinary Batch Counters
](
#ordinary-batch-counters
)
-
[
Distinct Batch Counters
](
#distinct-batch-counters
)
-
[
Distinct Batch Counters
](
#distinct-batch-counters
)
-
[
Sum Batch Counters
](
#sum-batch-counters
)
-
[
Sum Batch Operation
](
#sum-batch-operation
)
-
[
Add Operation
](
#add-operation
)
-
[
Estimated Batch Counters
](
#estimated-batch-counters
)
-
[
Estimated Batch Counters
](
#estimated-batch-counters
)
Batch counting requires indexes on columns to calculate max, min, and range queries. In some cases,
Batch counting requires indexes on columns to calculate max, min, and range queries. In some cases,
...
@@ -276,7 +277,7 @@ distinct_count(::Note.with_suggestions.where(time_period), :author_id, start: ::
...
@@ -276,7 +277,7 @@ distinct_count(::Note.with_suggestions.where(time_period), :author_id, start: ::
distinct_count
(
::
Clusters
::
Applications
::
CertManager
.
where
(
time_period
).
available
.
joins
(
:cluster
),
'clusters.user_id'
)
distinct_count
(
::
Clusters
::
Applications
::
CertManager
.
where
(
time_period
).
available
.
joins
(
:cluster
),
'clusters.user_id'
)
```
```
### Sum Batch
Counters
### Sum Batch
Operation
Handles
`ActiveRecord::StatementInvalid`
error
Handles
`ActiveRecord::StatementInvalid`
error
...
@@ -317,6 +318,25 @@ sum(Issue.group(:state_id), :weight))
...
@@ -317,6 +318,25 @@ sum(Issue.group(:state_id), :weight))
# returns => {1=>3542, 2=>6820}
# returns => {1=>3542, 2=>6820}
```
```
### Add Operation
Handles
`StandardError`
.
Returns
`-1`
if any of the arguments are
`-1`
.
Sum the values given as parameters.
Method:
`add(*args)`
Examples
```
ruby
project_imports
=
distinct_count
(
::
Project
.
where
.
not
(
import_type:
nil
),
:creator_id
)
bulk_imports
=
distinct_count
(
::
BulkImport
,
:user_id
)
add
(
project_imports
,
bulk_imports
)
```
### Estimated Batch Counters
### Estimated Batch Counters
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48233) in GitLab 13.7.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48233) in GitLab 13.7.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment