Updated on 2023-12-28 GMT+08:00

Usage

This section provides SQL test statements used in this tutorial. You are advised to copy the SQL statements in each section and save them as an .sql file. For example, create a file named create_table_fir.sql file and paste the SQL statements in section Creating an Initial Table to the file. Executing the file on an SQL client tool is efficient, and the total elapsed time of test cases is easy to calculate. Execute the .sql file using gsql as follows:

1
gsql -d database_name -h dws_ip -U username -p port_number -W password -f XXX.sql

Replace the italic parts in the example with actual values in GaussDB(DWS). For example:

1
gsql -d postgres -h 10.10.0.1 -U dbadmin -p 8000 -W password -f create_table_fir.sql

Replace the following information in the example based on the site requirements:

  • postgres: indicates the name of the database to be connected.
  • 10.10.0.1: cluster connection address.
  • dbadmin: username of the cluster database. The default administrator is dbadmin.
  • 8000: database port set during cluster creation.
  • password: password set during cluster creation.