Updated on 2025-09-04 GMT+08:00

Preparations

  • Environment: Ensure that GaussDB is running properly, obtain the JDBC driver, and configure the environment. For details, see "Application Development Guide > Development Based on JDBC > Development Procedure > Obtaining the JAR Package of the Driver and Configuring the JDK Environment" in Developer Guide.
  • Data: Create a test table and insert test data, as follows:
    gaussdb=# CREATE TABLE tab_test(id int,context varchar(1000),PRIMARY KEY(id));
    NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tab_test_pkey" for table "tab_test"
    CREATE TABLE
    gaussdb=# INSERT INTO tab_test SELECT generate_series(1,1000000),repeat('GaussDB Test', 50);
    INSERT 0 1000000