b6125f7045
This commit does a number of things: 1. Reduces the number of queries needed by perform a single query to get all the tuples for the relevant rows. 2. Uses a transaction to query the tuple counts to ensure that the data is retrieved from the primary. Closes #46742
9 lines
217 B
Ruby
9 lines
217 B
Ruby
module CountHelper
|
|
def approximate_count_with_delimiters(count_data, model)
|
|
count = count_data[model]
|
|
|
|
raise "Missing model #{model} from count data" unless count
|
|
|
|
number_with_delimiter(count)
|
|
end
|
|
end
|