PolarDB for MySQL provides the Fast Import feature to query the full data of databases and tables in a restoration task after waiting for approximately 5 to 10 minutes (independent of the data size to be restored) after you submit a restoring database or table task, instead of waiting for the restoration task to complete.
Scenarios
The Fast Import feature is compatible with the new database and table restoration process, allowing query operations to be performed simultaneously with the restoration task.
The Fast Import feature can be used for acceleration in the following two scenarios:
When data or tables are accidentally deleted and the specific point in time cannot be determined, traditional restoration tasks may take a long time to complete. With the Fast Import feature, you can quickly query and verify data without waiting for the restoration task to complete.
When a small amount of data is accidentally deleted but the table is large, the Fast Import feature allows you to quickly obtain the required data from the table in the restoration task using
INSERT ... SELECT ...and insert it into the table with the accidentally deleted data, thereby improving the efficiency.
Supported versions
Your cluster must run MySQL 8.0.1 with the revision version 8.0.1.1.49 or later. You can check your cluster revision version as specified in Query the engine version.
Precautions
This feature is in the canary release phase. To use this feature, you can contact us.
Only file-per-table configuration (default) is supported: You can query data only in tables that are not compressed or encrypted during the execution of restoration tasks.
When the number of tables in the restoration task is less than 1000, the
Fast Importfeature is enabled by default, allowing you to query the full data during the restoration process.NoteWhen the number of restoration tasks exceeds 1000, the
Fast Importfeature is not enabled. The task management flow will automatically determine whether to enable theFast Importfeature based on your current task submission.Query operations are only supported on primary nodes and read-only nodes. If column store read-only nodes exist, you can use the hints to force route query requests to primary nodes or row store read-only nodes. Otherwise, no data is returned.
When
buffer poolresources are sufficient, accessing a table which is being restored delivers a comparable efficiency to normal tables. However, if the cluster has high workloads, the efficiency of accessing a table which is being restored is limited to reduce the impact on normal business operations.Before the restoration task is completed, the table can only be accessed in read-only mode.
Usage notes
Submit database and table restoration tasks
After submitting a database and table restoration task, you can access the task details page by clicking the details link in the upper right corner of the page.

On the task details page, you can see the real-time progress of the task. After Step 4 is completed, you can confirm that the database or table has been created in the restoration task by executing statements such as show databases or show tables. Then, you can query the full data of the database or table.

Fast read-only access
You can query the information_schema.fast_import_tablespaces table to obtain information about all tables that support fast read-only access in the current restoration task.
You can perform fast read-only access to the tables that have data being imported, but specific table names will not be displayed in the query results. You can execute the SHOW PROCESSLIST command to view SQL statements containing dbms_rman.import to obtain the names of tables that are being restored.
SELECT * FROM information_schema.fast_import_tablespaces;Figure 1. You can have read-only access to full data of the tables that are being restored.

Figure 2. You can have read-only access to full data of other tables that have fast access enabled.

FAQ
Contact us
If you have any questions about the Fast Import feature, you can join DingTalk Group 28000021116. You can directly talk to experts in the group and raise your questions. In addition, PolarDB for MySQL Assistant can answer your questions in a 24/7 manner.
