Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
This document contains performance testing results for Circulation Log item barcode search functionality performed on large dataset of 6M+ circulation log entries.
Performance testing of the Circulation Log Item Barcode Search was conducted against a dataset of 6M+ circulation log entries on the asptc2 environment. Two search types were evaluated — full barcode search and right-truncated barcode search — each tested across four offset levels and three filter combinations.
Full barcode search (Test №1) demonstrated stable performance, with average response times of 64–102 ms and 95th percentile under 208 ms across all offsets and filters. Pagination depth and filters had minimal impact on response times.
Right-truncated barcode search (Test №2) performed well under default and description filter conditions (avg 158–226 ms), but showed a slower performance with the date filter, where average response times spiked to ~2 seconds (~10× slower). This behavior is reflected in elevated DB CPU utilization (avg 13%, with spikes up to 15%).
Resource utilization remained moderate overall. The mod-audit service CPU averaged 22% (max 27%) during full barcode search and increased to 28% (max 31%) during right-truncated search, while memory usage stayed stable in both tests. DB CPU averaged 9% for full barcode search with no visible DB load. For right-truncated search, DB CPU varied significantly by filter: 7% without filters, 8% with the description filter, 13% with spikes to 15% when the date filter was applied — correlating directly with increased response times.
This table contains Circulation Log full item barcode search durations across multiple offsets and filter combinations. Response times are stable across all offsets and filters. Averages range from 64 to 102 ms; 95th percentiles stay within 104–208 ms. Adding date or description filters does not impact. Pagination depth has no impact.
Default
With date filter
With description filter
Response Times, ms
Average
95% Line
Average
95% Line
Average
95% Line
LIMIT 100 OFFSET 0
102
208
69
115
77
138
LIMIT 100 OFFSET 100000
68
144
69
110
74
128
LIMIT 100 OFFSET 3500000
64
104
65
135
70
115
LIMIT 100 OFFSET 5800000
77
127
72
127
72
117
Test №2 This table contains Circulation Log Right-Truncated item barcode search durations across multiple offset values and filter combinations. Default and description-filtered queries show stable performance (avg 158–226 ms). However, the date filter showsaverage response times jumping to ~2 sec and 95th percentile exceeding 2,2sec. This pattern is consistent across all offset values.
Default
With date filter
With description filter
Response Times, ms
Average
95% Line
Average
95% Line
Average
95% Line
LIMIT 100 OFFSET 0
158
232
1972
2194
192
266
LIMIT 100 OFFSET 100000
174
259
2006
2268
226
326
LIMIT 100 OFFSET 3500000
171
252
2017
2287
210
310
LIMIT 100 OFFSET 5800000
170
260
2006
2271
207
304
Resources Utilization for Test 1
Service CPU Utilization
mod-audit CPU averaged 22% (max 27%)
Service Memory Utilization
mod-audit Memory usage was stable
DB CPU Utilization
DB CPU averaged 9% (max 10%)
DB Connections
DB load
No visible load was observed during tests
Resources Utilization for Test 2
Service CPU Utilization
mod-audit CPU averaged 28% (max 31%)
Service Memory Utilization
mod-audit Memory usage was stable
DB CPU Utilization
DB CPU varied by filter: 7% (no filter), 13% with spikes to 15% (date filter), and 8% (description filter).
DB Connections
DB load
SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE ((CASE WHEN length(lower(f_unaccent(?))) <= ? THEN left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) >= lower(f_unaccent(?)) ELSE left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) >= left(lower(f_unaccent(?)),?) AND lower(f_unaccent(circulation_logs.jsonb->>?)) >= lower(f_unaccent(?)) END) AND (CASE WHEN length(lower(f_unaccent(?))) <= ? THEN left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) <= lower(f_unaccent(?)) EL SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE get_tsvector(f_unaccent(circulation_logs.jsonb->>?)) @@ tsquery_phrase(f_unaccent(?)) ORDER BY left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) DESC, lower(f_unaccent(circulation_logs.jsonb->>?)) DESC LIMIT ? OFFSET ? SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE (lower(f_unaccent(circulation_logs.jsonb->>?)) LIKE lower(f_unaccent(?))) AND (get_tsvector(f_unaccent(circulation_logs.jsonb->>?)) @@ tsquery_phrase(f_unaccent(?))) ORDER BY left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) DESC, lower(f_unaccent(circulation_logs.jsonb->>?)) DESC LIMIT ? OFFSET ?
record_type record_count Circulation Log Records 6041662
Methodology/Approach
1. Data preparation step
A dataset of 6M records was generated for testing.
It contained 500K unique barcodes, randomly distributed across a 1-year time range.
Data was generated using the following query:
WITH bc AS (
SELECT
jsonb->>'barcode' AS barcode,
row_number() OVER () AS rn
FROM cs00000int_0001_mod_inventory_storage.item
WHERE NULLIF(TRIM(jsonb->>'barcode'), '') IS NOT NULL
LIMIT 500000
),
bc_cnt AS (
SELECT count(*) AS cnt FROM bc
),
gen AS (
SELECT
gen_random_uuid() AS new_id,
gs,
(gs % (SELECT cnt FROM bc_cnt)) + 1 AS idx
FROM generate_series(1, 500000) gs
)
INSERT INTO cs00000int_0001_mod_audit.circulation_logs (id, jsonb)
SELECT
g.new_id,
jsonb_set(
jsonb_set(
jsonb_set(
'{
"id": "",
"date": "",
"items": [
{
"itemId": "27efe92f-1b5c-5b32-b6c7-48e71539b52e",
"loanId": "0af86ff6-bc0f-4a62-a5ea-42976f1dc91f",
"holdingId": "e8cd4664-1b53-5cc2-a139-ee2bc8229eaa",
"instanceId": "243ad997-f24d-5f46-89a9-ff8b8b59c390",
"itemBarcode": ""
}
],
"action": "Checked out",
"object": "Loan",
"source": "EBSCOAdmin, EBSCOAdmin",
"linkToIds": {
"userId": "0001ef6e-216a-4436-8ee7-42121519afe6"
},
"description": "Checked out to proxy: no.",
"userBarcode": "813487757",
"servicePointId": "9d1b77e8-f02e-4b7f-b296-3f2042ddac54"
}'::jsonb,
'{id}',
to_jsonb(g.new_id::text)
),
'{date}',
to_jsonb(
to_char(
now() - (random() * interval '365 days'),
'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"'
)
)
),
'{items,0,itemBarcode}',
to_jsonb(b.barcode)
)
FROM gen g
JOIN bc b
ON b.rn = g.idx;
2. Test Configuration:
10-minute tests with 1 user invoking the following API: GET audit-data/circulation/logs.
Two search types were evaluated — full barcode search (e.g., itemBarcode=="37413321512263") and right-truncated barcode search (e.g., itemBarcode="3741*") — each tested across four offset (0, 100K, 3.5M, 5.8M), limit 100, and three filter combinations (None, Date Filter [1-year time range], Description Filter).
Barcodes for the test were retrieved using the following query:
SELECT
item->>'itemBarcode' AS item_barcode,
COUNT(*) AS occurrences
FROM cs00000int_0001_mod_audit.circulation_logs
CROSS JOIN LATERAL jsonb_array_elements(jsonb->'items') AS item
WHERE NULLIF(item->>'itemBarcode', '') IS NOT NULL
GROUP BY item->>'itemBarcode'
ORDER BY occurrences DESC
LIMIT 200;