| name | alloydb-omni-performance |
| description | Use these skills when you need to analyze query performance, generate execution plans, check table/column statistics, and monitor overall database activity. |
Usage
All scripts can be executed using Node.js. Replace <param_name> and <param_value> with actual values.
Bash:
node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'
PowerShell:
node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
Scripts
execute_sql
Use this skill to execute a single SQL statement.
Parameters
| Name | Type | Description | Required | Default |
|---|
| sql | string | The sql to execute. | Yes | |
get_column_cardinality
Estimates the number of unique values (cardinality) quickly for one or all columns in a specific PostgreSQL table by using the database's internal statistics, returning the results in descending order of estimated cardinality. Please run ANALYZE on the table before using this skill to get accurate results. The skill returns the column_name and the estimated_cardinality. If the column_name is not provided, the skill returns all columns along with their estimated cardinality.
Parameters