Use Unified Query Offload with Cloud Links
When you have heavy read workloads using cloud links you can configure an elastic pool leader or member as a cloud links provider, where the provider enables ProxySQL query offload to offload queries (reads) to any number of refreshable clones.
- About Unified Query Offload with Cloud Links
Unified query offload provides configuration and performance advantages by allowing one or more refreshable clones to handle queries for an elastic pool leader or member that combines the elastic pool feature query offload with Cloud Links target offloading. - Enable Unified Query Offload with Cloud Links
Describes how to enable unified query offload with Cloud Links for an elastic pool leader or for an elastic pool member. - Disable Unified Query Offload
Describes how to disable unified query offload.
Parent topic: Use and Manage Elastic Pools on Autonomous Database
About Unified Query Offload with Cloud Links
Unified query offload provides configuration and performance advantages by allowing one or more refreshable clones to handle queries for an elastic pool leader or member that combines the elastic pool feature query offload with Cloud Links target offloading.
Unified query offload allows you to add refreshable clones to accommodate increasing query (read) demand originating from use of Cloud Links on Cloud Links consumers. Offloading such Cloud Links queries from a single producer allows your application to scale horizontally, where you can add refreshable clones to maintain overall system performance. With this configuration, you can adjust resources as needed to satisfy your query request volume.
An advantage of using unified query offload is this feature enables you to set up Cloud Links offload target one time, and have queries automatically routed to any number of refreshable clones without configuration changes. By enabling ProxySQL read only query offloading and combining this with Cloud Links target offloading, you can add or remove refreshable clones and the list of refreshable clones to send queries to is automatically updated, without requiring any manual configuration. When more refreshable clones are added, unified query offload dynamically adjusts to make use of new resources as they are added. In comparison, when you use Cloud Links and you configure offload targets without unified query offload, using Cloud Links target offloading alone, you must manually configure the list of refreshable clones to send queries to. Unified query offload specifies a single Cloud Links offload target that is an elastic pool leader or member, and the target uses ProxySQL to offload queries to any number of refreshable clones.
The following figure shows unified query offload with the following:
-
Three Cloud Links consumers: Instance 1, Instance 2, and Instance 3
-
A Cloud Links producer that is also an elastic pool leader (this instance could also be an elastic pool member). This instance has query offload enabled.
-
Three Elastic Pool refreshable clones for query offloading
As is the case for query offload, with unified query offload the data on the refreshable clones is up to date based on the last refresh time for each refreshable clone. This means when you use unified query offload, you must perform all operations on data that involve DDL, DML or PL/SQL on the elastic pool leader. Then, after a refreshable clone is refreshed, the changes from the instance where is read only offload is enabled are reflected on the refreshable clone.
See Use Refreshable Clones with Autonomous Database for more information.
Unified Query Offload Features
Unified query offload provides all of the features of ProxySQL query offloading, including:
-
Dynamic Addition: Refreshable clones may be added as members of the elastic pool at any time. Query offload dynamically adjusts to make use of new members.
-
Dynamic Removal: Refreshable Clones may be removed as members of the elastic pool at any time. Query offload dynamically adjusts to stop offloading queries to a refreshable clone that has been removed from the elastic pool.
-
All other ProxySQL features. See About Query Offloading for more information.
Parent topic: Use Unified Query Offload with Cloud Links
Enable Unified Query Offload with Cloud Links
Describes how to enable unified query offload with Cloud Links for an elastic pool leader or for an elastic pool member.
The following are requirements for enabling unified query offload and are the same as for enabling Proxy SQL query offload:
-
You can enable unified query offload for an elastic pool leader or for an elastic pool member with no Refreshable Clones. After you enable unified query offload you can add refreshable clones and unified query offload dynamically adjusts to make use of the refreshable clones.
-
A refreshable clone that is a candidate for use with unified query offload must:
-
Have the elastic pool leader as its source database and be in the same region as the elastic pool leader.
or
Have an elastic pool member as its source database and be in the same region as the elastic pool member.
-
Be an elastic pool member.
-
To enable unified query offload perform the following steps:
You can monintor Cloud Links status to verify that a data set is ProxySQL enabled with the Cloud Links views. See Monitor and View Cloud Links Information for more information.
Parent topic: Use Unified Query Offload with Cloud Links
Disable Unified Query Offload
Describes how to disable unified query offload.
There are several ways to disable unified query offload:
-
On the producer instance disable read only query offload.
For example:
EXEC
DBMS_PROXY_SQL.DISABLE_READ_ONLY_OFFLOAD
;See Disable Query Offload and DISABLE_READ_ONLY_OFFLOAD Procedure for more information.
-
On the producer instance, unregister the Cloud Links registration.
See Register or Unregister a Data Set and UNREGISTER Procedure for more information.
-
On the producer instance, update the Cloud Links registration and set the
offload_targets
parameter value to a non-NULL
value. If you register the data set or update the data set and you specify theoffload_targets
parameter with a value other thanNULL
, this disables unified query offload.See Update Data Set Registration Attributes and UPDATE_REGISTRATION Procedure for more information.
Parent topic: Use Unified Query Offload with Cloud Links