When you issue an SQL statement that contains a database link, you need to use the complete database link name as stored in the data dictionary. For more information about database link names, see Create database links.
When ApsaraDB for OceanBase connects to a remote database, ApsaraDB for OceanBase uses a database connection string to access the remote database. If the connection succeeds by using the database string, username, and password, ApsaraDB for OceanBase follows the rules in Reference schema objects to access the specified object in the remote database. However, take note of the following limits:
You can only execute read-only statements.
You can only access table objects but not other objects such as views and sequences.
When you access a table object, you must explicitly specify the database name, for example,
The following plans and operators are not supported:
You cannot perform the
RESCANoperation on the remote database.
You cannot execute the operators such as
NESTED LOOP JOIN,
ANTI JOIN, and
SUBPLAN FILTERon the remote database.
If the preceding problems occur, you can attempt to run the
EXPLAIN PLANstatement to view the original plan and the SQL statements sent to the remote cluster for execution, and adjust the plan by using a hint.