The Globex company's research department needs a "sandbox" for an exploratory project, with these requirements:
- Departmental control
- Six-month limit
- Access to data from production warehouse
- User control of own data
- Ability to add processing power as project grows
- Daily operating cycle
- Does not need run-time elasticity
To minimize unused resources, the compute cluster administrator creates a compute group and a compute profile as follows:
CREATE COMPUTE GROUP Research_Group
USING QUERY_STRATEGY ('STANDARD');
CREATE COMPUTE PROFILE Research_Resources IN Research_Group, INSTANCE = TD_COMPUTE_SMALL -- Default SLA USING MIN_COMPUTE_COUNT (3) -- Query capacity ~30 queries, MAX_COMPUTE_COUNT (3) -- not elastic START_TIME (' 45 14 * * * ') -- Start compute cluster at 8:00 AM PST END_TIME (' * 0 * * * ') -- Stop compute cluster at 5:00 PM PST COOLDOWN_PERIOD (1);
When the project needs more processing power, the compute cluster administrator does the following:
- Creates a new compute profile in the same compute group:
CREATE COMPUTE PROFILE Research_Resources_II IN Research_Group, INSTANCE = TD_COMPUTE_LARGE -- 4 x default SLA USING MIN_COMPUTE_COUNT (2) -- 2 x default query capacity (~20 queries) MAX_COMPUTE_COUNT (3) -- Query capacity elastic to 3 x default (~30 queries) START_TIME (' 45 14 * * * ') -- Start compute cluster at 8:00 AM PST END_TIME (' * 0 * * * ') -- Stop compute cluster at 5:00 PM PST COOLDOWN_PERIOD (1);
- Suspends the original compute profile to let the running queries transition to the new compute profile:
SUSPEND COMPUTE FOR COMPUTE PROFILE Research_Resources IN Research_Group;
- Removes the original compute profile from the database:
DROP COMPUTE PROFILE Research_Resources IN Research_Group;