获取帮助

使用SQLdiag工具前,您可以通过以下指令获取帮助。

  1. gs_dbmind component sqldiag --help

显示如下帮助信息:

  1. usage: [-h] [-f CSV_FILE] [--predicted-file PREDICTED_FILE]
  2. [--model {template,dnn}] --model-path MODEL_PATH
  3. [--config-file CONFIG_FILE]
  4. {train,predict,finetune}
  5. SQLdiag integrated by openGauss.
  6. positional arguments:
  7. {train,predict,finetune}
  8. The training mode is to perform feature extraction and
  9. model training based on historical SQL statements. The
  10. prediction mode is to predict the execution time of a
  11. new SQL statement through the trained model.
  12. optional arguments:
  13. -h, --help show this help message and exit
  14. -f CSV_FILE, --csv-file CSV_FILE
  15. The data set for training or prediction. The file
  16. format is CSV. If it is two columns, the format is
  17. (SQL statement, duration time). If it is three
  18. columns, the format is (timestamp of SQL statement
  19. execution time, SQL statement, duration time).
  20. --predicted-file PREDICTED_FILE
  21. The file path to save the predicted result.
  22. --model {template,dnn}
  23. Choose the model model to use.
  24. --model-path MODEL_PATH
  25. The storage path of the model file, used to read or
  26. save the model file.
  27. --config-file CONFIG_FILE