AnalyticDB for PostgreSQL provides the sample dataset to help you quickly test your AnalyticDB for PostgreSQL instance.

For information about query statements that can be executed on the sample dataset, see the "Query examples" section of the Dataset information and query examples topic.

Precautions

  • If your instance is in elastic storage mode, the sample dataset is supported only for V6.3.10.3 or later. If your instance is in Serverless mode, the sample dataset is supported only for V1.0.4.0 or later. For more information about how to update the minor engine version of your instance, see Update the minor engine version.
  • The sample dataset is about 10 GB in size. Make sure that your instance has sufficient storage space.
  • The sample dataset contains a database named adb_sampledata_tpch. Make sure that your instance does not have a database with the same name. Otherwise, the dataset may fail to be loaded.
  • It may take 6 to 8 minutes to load the sample dataset. During this period, operations on your instance such as adding nodes or changing node specifications may be affected.

Load the sample dataset when you create an instance

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-right corner, click Create Instance to go to the buy page.
  3. On the buy page, configure parameters for the instance.
    Select Loaded for Sample Data. For more information about other parameters, see Create an instance.
  4. Click Buy Now.
  5. On the Confirm Order page, perform the following operations based on the value of the Product Type parameter:
    • Subscription
      1. Confirm the information in the Parameters section, read and select Terms of Service, and then click Pay.
      2. On the Purchase page, click Subscribe.
    • Pay-as-you-go

      Confirm the information in the Parameters section, read and select Terms of Service, and then click Activate Now.

  6. After the instance is created, go to the Instances page to view the instance.
    Note It takes a period of time to initialize an AnalyticDB for PostgreSQL instance. You can perform operations only when the instance is in the Running state.

Load the sample dataset for an existing instance

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select the region where the instance resides.
  3. Find the instance that you want to manage and click its ID.
  4. On the Basic Information page, choose Sample Dataset > Load Dataset.
  5. In the Load Sample Dataset message, click OK.

Release the sample dataset

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select the region where the instance resides.
  3. Find the instance that you want to manage and click its ID.
  4. On the Basic Information page, choose Sample Dataset > Release Dataset.
  5. In the Release Sample Dataset message, click OK.

FAQ

  • Q: What do I do if the sample dataset fails to be loaded?

    A: If the sample dataset fails to be loaded, you can load the sample dataset again.

  • Q: How do I check whether the sample dataset is loaded?

    A: The console does not show whether the sample dataset is loaded. You can log on to the database and execute SELECT count(*) FROM lineitem; to query the number of rows of the sample data. If the sample data has about 5.99 million rows, the sample dataset is loaded.

  • Q: How do I test my instance after the sample dataset is loaded?

    A: You can use TPC-H query statements to test performance of your instance. For more information about the query statements, see the "Query examples" section of the Dataset information and query examples topic.

References

For more information about the sample dataset and query statement examples, see Dataset information and query examples.