Test DML performance


Job details

Name: Test DML performance
Platform: Postgres
Category: Performance
Description: Runs performance test. Procedure executes SELECT, INSERT, UPDATE, DELETE and TRUNCATE statements on schema test tables.
Long description: Task runs performance test. Procedure executes SELECT, INSERT, UPDATE, DELETE and TRUNCATE statements on the dbWatch engine schema test tables.
Version: 1.2
Default schedule: 10 22 5 1,30
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘postgres’]/.[hasengine=‘YES’ & newer_than_ninetwo = ‘1′]

Parameters

Name Default value Description
records number -9 Number of rows to insert into the test table.

Job Summary

SELECT, INSERT, UPDATE, DELETE, TRUNCATE

Implementation Details

```sql
CREATE TABLE dbw_test_tab(col1 int, col2 varchar(1000));
CREATE TABLE dbw_performance(counter_id int, type varchar(20), t_start time, t_end time, rows_number int, h_date date);
CREATE TABLE dbw_performance_histr (counter_id int, type varchar(20), t_start time, t_end time, duration int, avg_dur int, rows_number int, histr_date date);

CREATE OR REPLACE FUNCTION dbw_dml_perf_test (rows_no int) RETURNS void AS $func$
DECLARE /* … code here … */
END;
$func$ LANGUAGE ‘plpgsql’ VOLATILE;
```

Job Execution

The job is scheduled to run at specific intervals (not defined within the provided XML but probably managed through job scheduling tools in dbWatch). It checks the performance of different DML operations across multiple record counts (from 5,000 to 160,000 records), thereby providing a comprehensive view of how the database performs under various loads.

Expected Output and Report

Dependencies and Clean-up

Insurance is in place to clean up after failed operations involving any dependent objects like tables or procedures specified within the job definition (dbw_test_tab, dbw_performance, etc.). This safeguards against leftover artifacts that could otherwise clutter the system or influence subsequent tests inaccurately.

Administration and Monitoring

Because this job involves detailed logging and dependency management, it is a critical part of database health monitoring strategies, particularly for environments where DML performance directly correlates with user experience or system stability. The automatic handling of tasks through dbWatch enhances robust and consistent performance oversight.