Set of examples
This section will cover three configuration examples that will show you how to prepare your Virtual DataPort server Resource Manager for your use cases.
Let's suppose several things:
- Our Denodo administrators sometimes need to perform maintenance tasks with high priority using the Web Design Studio.
- Some queries are from an Operational environment only available from 7am to 8pm and which can't return more than 100 rows.
- Some queries are from an Analytical environment where queries can run for more than 3 hours and have a lower priority than operational queries, but no more than 4 analytical report queries can be running at the same time.
Example 1: Add higher priority to admin queries
In this first example, we have to add a rule for Denodo Administrators that sets their queries to have the maximum priority
The following steps have to be performed:
- Create a new Plan called "admin".
- Click on New restriction.
- Select
Execute when: Always
- Select the following actions:
Set priority: 10
- Click Ok to save the restriction.
- Click Ok again to save the plan.
- Go to the Rules tab.
- Click on New.
- Enter "denodo admin" as name.
- In this dialog, add the condition:
access_interface = 'Web-Design-Studio' AND admin_user = true
- Select admin as plan.
- Click Ok to save the rule.

Example 2: Limit the number of rows returned
In this example, we are going to create two rules to restrict the execution of operational queries to only
certain times of the day and to limit the maximum number of rows returned. Using this rule,
we will avoid large queries (for example, a typical SELECT * FROM table
) to be executed in the server.
The following steps have to be performed:
- Create a new Plan called "max 100 rows".
- Click on New restriction.
- Select Execute when: Always.
- Select the following actions:
- Stop query when the maximum number of returned rows has been reached: 100.
- Set priority > 7.
- Click Ok to save the restriction.
- Click Ok again to save the plan.
- Create a new Plan called "reject all queries".
- Click on New restriction.
- Select Execute when: Always.
- Select Stop query always .
- Click Ok to save the restriction.
- Click Ok again to save the plan.
- Go to the Rules tab.
- Click on New.
- Enter "operational hours" as name.
- In this dialog, add the following condition: user_agent = 'operational_env' AND (gethour(connection_start_time) < 7 OR gethour(connection_start_time) >= 20)
- Select
reject all queries
as plan. - Click Ok to save the rule.
- Click on New to add another rule.
- Enter "operational rows" as name.
- In this dialog, add the following conditions: user_agent: operational_env (this name has to be set in the application)
- Select max 100 rows as plan.
- Click Ok to save the rule.



Example 3: Change the concurrent requests limit
For this example, we are going to create one rule/plan similar to the previous one with one small difference. This time, we are going to suppose that analytical queries will be performed from Tableau, so they are always going to use the ODBC interface to connect to Virtual DataPort.
Additionally, if the server is under heavy load conditions, we want to limit concurrent analytical queries.
To do this, following steps have to be performed:
- Create a new Plan called "limit analyical concurrent queries".
- Click on New restriction.
- Select Execute when: Always.
- Select the following actions:
- Set the maximum number of concurrent queries: 4.
- Set priority: 5.
- Click Ok to save the restriction.
- Click on New restriction.
- Select Execute when: When the CPU usage goes over a certain percentage: 50.
- Select the following actions:
- Set the maximum number of concurrent queries: 2.
- Set priority: 4.
- Click Ok to save the restriction.
- Click Ok again to save the plan.
- Go to the Rules tab.
- Click on New.
- Enter "analytical report queries" as name.
- In this dialog you have to add the following condition:
- user_agent = 'analytical_env' OR access_interface = 'ODBC'
- Select limit analytical concurrent queries as plan.
- Click Ok to save the rule.

With these examples, you have finished the Workload Management Tutorial. Now it's time to continue exploring what the Denodo Platform can do for you, take a look at the official reference manuals and play with your own use cases.
Congratulations!