All Products
Search
Document Center

AnalyticDB:Manage sample datasets

Last Updated:Mar 30, 2026

AnalyticDB for PostgreSQL includes a TPC-H sample dataset for testing and exploring your instance. Load it to run benchmark queries and verify instance performance before connecting your own data.

Prerequisites

Before you begin, make sure that:

  • Your instance runs a supported version: V6.3.10.3 or later (elastic storage mode) or V1.0.4.0 or later (Serverless mode). To update the minor version, see Update the minor version of an instance.

  • Your instance has at least 10 GB of available storage space.

  • Your instance does not have an existing database named adb_sampledata_tpch. If a database with that name exists, the load operation may fail.

About the sample dataset

The sample dataset is a TPC-H dataset that models a fictional order management business. It includes tables for customers, orders, line items, suppliers, and products — the kind of data that answers questions like "Which regions generated the most revenue last quarter?" or "Who are the top suppliers by order volume?"

After loading, the dataset contains approximately 5.99 million rows in the lineitem table and occupies about 10 GB of storage. This storage counts toward your instance's storage quota.

For the full table schema and query examples, see Dataset information and query examples.

Load a 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.

  3. On the buy page, configure the instance parameters. For Sample Data, select Loaded. For all other parameters, see Create an instance.

  4. Click Buy Now.

  5. On the Confirm Order page, complete the purchase based on your billing type:

    • Subscription: Confirm the parameters, read and select the Terms of Service, click Pay, and then click Subscribe on the Purchase page.

    • Pay-as-you-go: Confirm the parameters, read and select the Terms of Service, and then click Activate Now.

  6. After the instance is created, go to the Instances page to check the status.

Instance initialization takes a few minutes. The instance is ready when its status changes to Running.

The sample dataset loads automatically after the instance reaches the Running state. Loading takes approximately 6 to 8 minutes. During this period, operations such as adding nodes or changing node specifications may be affected.

Load a sample dataset for an existing instance

  1. Log on to the AnalyticDB for PostgreSQL console.

  2. In the upper-left corner, select a region.

  3. Find the instance and click its ID.

  4. On the Basic Information page, choose Sample Dataset > Load Dataset.

  5. In the Load Sample Dataset dialog, click OK.

Loading takes approximately 6 to 8 minutes. During this period, operations such as adding nodes or changing node specifications may be affected.

Verify that the dataset loaded successfully

Run the following query after loading completes:

SELECT count(*) FROM lineitem;

If the result is approximately 5,990,000, the dataset loaded successfully.

The AnalyticDB for PostgreSQL console does not show whether a sample dataset is loaded. If the sample dataset is loaded, a tick is displayed next to Sample Dataset in the console:

Release a sample dataset

  1. Log on to the AnalyticDB for PostgreSQL console.

  2. In the upper-left corner, select a region.

  3. Find the instance and click its ID.

  4. On the Basic Information page, choose Sample Dataset > Release Dataset.

  5. In the Release Sample Dataset dialog, click OK.

FAQ

The dataset failed to load. What should I do?

Load the dataset again. On the Basic Information page, choose Sample Dataset > Load Dataset and click OK.

How do I run performance tests after loading the dataset?

Use TPC-H SQL statements to benchmark your instance. For query examples, see the "Query examples" section of Dataset information and query examples.

What's next