All Products
Search
Document Center

AnalyticDB:Quick Start for Serverless Pro

Last Updated:Mar 28, 2026

AnalyticDB for PostgreSQL is a cloud-native Massively Parallel Processing (MPP) data warehouse for online analytical processing (OLAP) of large-scale data. In Serverless Pro mode, compute and storage scale independently, so you pay only for the resources you use.

This tutorial walks you through the complete flow: create an instance, configure access, load sample data, and run your first query.

What you'll learn:

  • Create a Serverless Pro instance and configure its key parameters

  • Set up an IP address whitelist for client access

  • Create an initial database account

  • Load a built-in sample dataset

  • Connect to the database and run a SQL query

Prerequisites

Before you begin, make sure you have:

  • An Alibaba Cloud account. If you don't have one, register on the Alibaba Cloud website.

  • Authorized a service-linked role. The first time you use AnalyticDB for PostgreSQL, authorize this role in the console:

    1. Log on to the AnalyticDB for PostgreSQL console.

    2. In the upper-right corner, click Create Instance.

    3. In the Create Service Linked Role dialog box, click OK.

Billing

Creating an instance incurs charges for compute and storage resources. For pricing details, see Pricing.

Step 1: 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 purchase page.

  3. Configure the core parameters in the table below. Keep the default values for any parameters not listed. For a full parameter reference, see Create an instance.

    ParameterDescriptionExample
    Product typeSubscription: Prepaid billing, suitable for long-term use. The longer the subscription period, the higher the discount. Pay-as-you-go: Hourly billing, suitable for short-term use. Release the instance after use to stop charges.Pay-as-you-go
    Region and zoneThe geographic location of the instance. The region cannot be changed after purchase. To connect over a private network, create the instance in the same region as your Elastic Compute Service (ECS) instance.China (Hangzhou): Zone J
    Instance resource typeStorage Elastic Mode: Supports independent disk scale-out and online smooth scale-out. Serverless Pro: Specify only the compute resources you need—no storage reservation required.Serverless Pro
    Master resourcesThe Master node specifications. Use the formula: Master compute unit (CU) = number of CPU cores per segment. Increase Master resources after instance creation if needed.8 CU (Free)
    Reserved compute resourcesThe total number of CUs for compute nodes. Each CU corresponds to one segment. The minimum is 16 CUs (16 segments).16
    Serverless cache spaceThe total cloud disk size attached to all compute nodes (not the per-node cache size). Set the minimum to 800 GB. If your total data volume exceeds 800 GB, set this to approximately 30% of your total data volume to cover frequently accessed (hot) data.800 GB
    Virtual Private Cloud (VPC)The VPC for the instance. To connect to an ECS instance over a private network, select the same VPC.vpc-xxxx
    vSwitchA vSwitch within the selected VPC. If no vSwitches are available in the current zone, switch to another zone or create a vSwitch.vsw-xxxx
  4. Click Buy Now, confirm the order, and click Activate Now.

  5. After payment, click Management Console to return to the instance list.

Instance initialization takes a few minutes. Wait until the instance status changes to Running before proceeding.

Step 2: Configure a whitelist (optional)

Skip this step if you only access the database through Data Management (DMS). If you plan to connect from a local integrated development environment (IDE), add your client IP address to the whitelist first. To find your client IP address, see Preparations.
  1. In the instance list, click the instance ID to open the instance details page.

  2. In the left navigation pane, click Security Controls.

  3. Click Create Whitelist and set the following parameters:

    ParameterDescription
    Whitelist nameMust consist of lowercase letters, digits, and underscores (_). Must start with a lowercase letter and end with a lowercase letter or digit. Length: 2–32 characters.
    IP addressesThe IP addresses or CIDR blocks to allow. Separate multiple entries with commas (,). Up to 999 unique entries. Accepted formats: specific IP addresses (e.g., 10.23.12.24) and CIDR blocks (e.g., 10.23.12.24/24, prefix length 1–32). Setting 0.0.0.0/0 allows access from all IP addresses—use this with caution. Setting 127.0.0.1 blocks all external access.
  4. Click OK.

Step 3: Create an initial account

Important

AnalyticDB for PostgreSQL has two account types:

  • Privileged user: The initial account is a privileged user with the RDS_SUPERUSER role, which grants full operational permissions on the database.

  • Regular user: Has no permissions by default. A privileged user (or another account with the GRANT permission) must explicitly grant access to database objects. See Create and manage users.

  1. In the left navigation pane, click Account Management.

  2. Click Create Account, fill in the fields, and click OK.

    ParameterDescription
    AccountMust consist of lowercase letters, digits, and underscores (_). Must start with a lowercase letter and end with a lowercase letter or digit. Cannot start with gp. Length: 2–16 characters.
    New password and Confirm passwordMust contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters (! @ # $ % ^ & * ( ) _ + - =). Length: 8–32 characters. Change your password regularly and avoid reusing old passwords.

Step 4: Load a sample dataset

Loading the built-in sample dataset takes 6–8 minutes.
  1. In the upper-right corner of the instance details page, choose Sample Dataset > Load Dataset.

image
  1. In the Load Sample Dataset dialog box, click OK.

Step 5: Connect to the database

This section uses DMS to connect. For other client options, see Client connections.

  1. In the upper-right corner of the instance details page, click Log On to Database.

  2. On the Log On to Instance page, enter your Database Account and Database Password, then click Logon.

Step 6: Query data

  1. In the left navigation pane of the DMS console, click the target instance. If you are in simple mode, switch to the Database Instances tab first. Confirm that the adb_sampledata_tpch database appears. If it doesn't, click the refresh button next to the instance.

image
  1. Double-click the public schema under adb_sampledata_tpch to open an SQL Console window. Run the following query:

    SELECT count(*) FROM lineitem;

    The result shows the total row count in the lineitem table:

    +-----------+
    | count(*)  |
    +-----------+
    |59986052   |
    +-----------+

What's next

You've created a Serverless Pro instance, loaded sample data, and run your first query. To continue: