Problem
The current database schema utilizes an anti-pattern. The table name is dynamically generated based on the unique scan_id. This is a problem, because: 1.) Table names are generated dynamically, 2.) Schema changes are a nightmare, 3.) Querying has far more complexity
Solution
Create a table called workload, add a scan_id to this table. Use this foreign key and modify all functions to interact with it. Filter based on the scan_id.