WLM Example: Using the SMC
All of the setup steps in the following example can be completed in the SMC (as shown) or by using SQL commands.
To set up a simple example of workload management:
- Log into the SMC and go to Manage > Workloads > Create Profile.
-
Create a profile and give it a meaningful name, such as
shortquerybias
.
By default, this profile contains a single resource pool:system
. -
Click Create Resource Pool under the
shortquerybias
profile. Name the new poolshortquerypool
, and give it 20 slots, a queue size of 100, a maximum row limit of 100000, and a maximum execution time of 1.
-
Mark the new resource pool as the default pool for this profile. Under
shortquerypool
, select Mark as Default Pool.A check mark will appear next to the resource pool name. - Click Rules > Create Rule.
-
Create a
Compile
type rule and name itfastlane
.
-
Require all queries against the
premdb
database to run inshortquerypool
.
-
Go back to Profiles/Resource Pools, click
shortquerybias
, and create a new active configuration.
You will see an activation message under the profile name. -
Go to the Query tab and run a query as a
non-superuser with
select
privileges on the tables in thepremdb
database. For example:
Note: When admin users and superusers (such as theyellowbrick
user) submit requests, they all go to theadmin
resource pool. -
Monitor WLM activity. Go to Manage > Workloads > Rule Processing to see which rules and pools were processed for the query.