AnalyticDB for PostgreSQL provides a sample dataset to help you use or test your AnalyticDB for PostgreSQL instances.
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.
Usage notes
For AnalyticDB for PostgreSQL instances in elastic storage mode, only AnalyticDB for PostgreSQL instances of V6.3.10.3 or later support the sample dataset. For AnalyticDB for PostgreSQL instances in Serverless mode, only AnalyticDB for PostgreSQL instances of V1.0.4.0 or later support the sample dataset. For information about how to update the minor version of an AnalyticDB for PostgreSQL instance, see Update the minor version of an instance.
A sample dataset is about 10 GB in size. Make sure that your instance has sufficient storage space.
A 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.A sample dataset may require approximately 6 to 8 minutes to be loaded. During this period, operations on your instance such as adding nodes or changing node specifications may be affected.
Load a sample dataset when you create an instance
- Log on to the AnalyticDB for PostgreSQL console.
In the upper-right corner of the console, click Create Instance to go to the buy page.
On the buy page, configure parameters for the instance.
Select Loaded for Sample Data. For information about the other parameters, see Create an instance.
Click Buy Now.
On the Confirm Order page, perform the following operations based on the value of the Product Type parameter:
Subscription
Confirm the information in the Parameters section, read and select the Terms of Service, and then click Pay.
On the Purchase page, click Subscribe.
Pay-as-you-go
Confirm the information in the Parameters section, read and select the Terms of Service, and then click Activate Now.
After the instance is created, go to the Instances page to view the instance.
NoteIt 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 a sample dataset for an existing instance
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
On the Basic Information page, choose .
In the Load Sample Dataset message, click OK.
Release a sample dataset
- Log on to the AnalyticDB for PostgreSQL console.
- In the upper-left corner of the console, select a region.
- Find the instance that you want to manage and click the instance ID.
On the Basic Information page, choose .
In the Release Sample Dataset message, click OK.
FAQ
Q: What do I do if a sample dataset fails to be loaded?
A: If a sample dataset fails to be loaded, you can load the sample dataset again.
Q: How do I check whether a sample dataset is loaded?
A: The AnalyticDB for PostgreSQL console does not show whether a sample dataset is loaded. You can connect to your instance and execute the
SELECT count(*) FROM lineitem;
statement to query the number of rows of the sample dataset. If the sample dataset has about 5.99 million rows, the sample dataset is loaded.Q: How do I test my AnalyticDB for PostgreSQL instance after a sample dataset is loaded?
A: You can execute the TPC-H statements to test performance of your instance. For more information, see the "Query examples" section of the Dataset information and query examples topic.
Q: After a sample dataset is loaded, what do I do if I cannot see the loaded dataset in the Data Management (DMS) console?
A: A sample dataset may require 6 to 8 minutes to be loaded. Make sure that the sample dataset is loaded. If the sample dataset is loaded, a tick is displayed next to Sample Dataset in the AnalyticDB for PostgreSQL console, as shown in the following figure.
In the left-side navigation pane of the DMS console, right-click the ID of your AnalyticDB for PostgreSQL instance under Instances Connected and select Refresh / Sync Dictionary. The sample dataset
adb_sampledata_tpch
appears.
References
For information about a sample dataset and query statement examples, see Dataset information and query examples.