mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 13:02:55 +00:00
## Problem - We run the large tenant oltp workload with a fixed size (larger than existing customers' workloads). Our customer's workloads are continuously growing and our testing should stay ahead of the customers' production workloads. - we want to touch all tables in the tenant's database (updates) so that we simulate a continuous change in layer files like in a real production workload - our current oltp benchmark uses a mixture of read and write transactions, however we also want a separate test run with read-only transactions only ## Summary of changes - modify the existing workload to have a separate run with pgbench custom scripts that are read-only - create a new workload that - grows all large tables in each run (for the reuse branch in the large oltp tenant's project) - updates a percentage of rows in all large tables in each run (to enforce table bloat and auto-vacuum runs and layer rebuild in pageservers Each run of the new workflow increases the logical database size about 16 GB. We start with 6 runs per day which will give us about 96-100 GB growth per day. --------- Co-authored-by: Alexander Lakhin <alexander.lakhin@neon.tech>
10 lines
719 B
SQL
10 lines
719 B
SQL
-- add 100000 rows or approximately 11 MB to the edges table
|
|
-- takes about 1 minute
|
|
INSERT INTO workflows.edges (created_at, workflow_id, uuid, from_vertex_id, to_vertex_id)
|
|
SELECT
|
|
now() - (random() * interval '365 days'), -- Random `created_at` timestamp in the last year
|
|
(random() * 100)::int + 1, -- Random `workflow_id` between 1 and 100
|
|
uuid_generate_v4(), -- Generate a new UUID for each row
|
|
(random() * 100000)::bigint + 1, -- Random `from_vertex_id` between 1 and 100,000
|
|
(random() * 100000)::bigint + 1 -- Random `to_vertex_id` between 1 and 100,000
|
|
FROM generate_series(1, 100000) AS gs; -- Generate 100,000 sequential IDs |