By default, DRDS enables the full table scan feature for newly created tables. However, frequent use of the full table scan feature consumes database resources and reduces query efficiency. This topic describes how to manually disable full table scan in the console.

Prerequisites

  • You must create tables before you manage tables in the console. For more information, see Create a DRDS table.
  • The target table must have a specified shard key. For more information about how to set a shard key, see Adjust shard keys.

Precautions

If the full table scan feature is not enabled for a DRDS table shard, you must include the shard key in the WHERE clause to access the table. Otherwise, DRDS will return the TDDL-4510 error code.

Procedure

  1. Log on to the DRDS console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. In the left-side navigation pane, click Instances.
  4. On the page that appears, find the target instance and click the instance ID.
  5. In the left-side navigation pane, choose Configuration and Management > Databases.
  6. On the page that appears, find the target database and click the database name.
    Click the database name
  7. In the left-side navigation pane, choose Table Management > Table Settings.
  8. On the page that appears, find the target table and click Advanced Settings in the Actions column.
    Full table scan
    Note The full table scan feature is supported only when Table Attributes is set to Database Shard. You can click Adjust shard keys to start database sharding.
  9. In the dialog box that appears, select No and click OK.
    Enable full table scan