Coder Social home page Coder Social logo

Comments (6)

martianzhang avatar martianzhang commented on May 29, 2024

请提供您的soar -print-config输出

from soar.

Ilcyb avatar Ilcyb commented on May 29, 2024

请提供您的soar -print-config输出

online-dsn:
  addr: ""
  schema: information_schema
  user: ""
  password: '********'
  charset: utf8mb4
  disable: true
test-dsn:
  addr: ""
  schema: information_schema
  user: ""
  password: '********'
  charset: utf8mb4
  disable: true
allow-online-as-test: false
drop-test-temporary: true
only-syntax-check: false
sampling-statistic-target: 100
sampling: false
profiling: false
trace: false
explain: true
conn-time-out: 3
query-time-out: 30
delimiter: ;
log-level: 3
log-output: /dev/stderr
report-type: markdown
report-css: ""
report-javascript: ""
report-title: SQL优化分析报告
markdown-extensions: 94
markdown-html-flags: 0
ignore-rules:
- COL.011
rewrite-rules:
- delimiter
- orderbynull
- groupbyconst
- dmlorderby
- having
- star2columns
- insertcolumns
- distinctstar
blacklist: ""
max-join-table-count: 5
max-group-by-cols-count: 5
max-distinct-count: 5
max-index-cols-count: 5
max-total-rows: 9999999
max-query-cost: 9999
spaghetti-query-length: 2048
allow-drop-index: false
max-in-count: 10
max-index-bytes-percolumn: 767
max-index-bytes: 3072
table-allow-charsets:
- utf8
- utf8mb4
table-allow-engines:
- innodb
max-index-count: 10
max-column-count: 40
index-prefix: idx_
unique-key-prefix: uk_
max-subquery-depth: 5
max-varchar-length: 1024
explain-sql-report-type: pretty
explain-type: extended
explain-format: traditional
explain-warn-select-type:
- ""
explain-warn-access-type:
- ALL
explain-max-keys: 3
explain-min-keys: 0
explain-max-rows: 10000
explain-warn-extra:
- Using temporary
- Using filesort
explain-max-filtered: 100
explain-warn-scalability:
- O(n)
show-warnings: false
show-last-query-cost: false
query: ""
list-heuristic-rules: false
list-rewrite-rules: false
list-test-sqls: false
list-report-types: false
verbose: false
dry-run: true
max-pretty-sql-length: 1024

from soar.

LPX-E5BD8 avatar LPX-E5BD8 commented on May 29, 2024

一般指定了数据库但是没有 EXPLAIN 和 INDEX 优化信息往往是数据库连接异常所致。可以修改一下 logout 和 loglevel,看一下日志里的信息。

from soar.

martianzhang avatar martianzhang commented on May 29, 2024

从提供的配置文件看,您未创建配置文件,命令行参数也未指定-online-dsn, -test-dsn,所以-print-config的输出中online-dsn和test-dsn输出的都为空。

另外提示一下,如果用户名或密码中有特殊字符需要通过配置文件配置,命令行中不支持存在特殊字符的账号和密码。

from soar.

Ilcyb avatar Ilcyb commented on May 29, 2024

从提供的配置文件看,您未创建配置文件,命令行参数也未指定-online-dsn, -test-dsn,所以-print-config的输出中online-dsn和test-dsn输出的都为空。

另外提示一下,如果用户名或密码中有特殊字符需要通过配置文件配置,命令行中不支持存在特殊字符的账号和密码。

指定了-test-dsn的时候也不会去连接数据库给出建议

online-dsn:
  addr: ""
  schema: information_schema
  user: ""
  password: '********'
  charset: utf8mb4
  disable: true
test-dsn:
  addr: 192.168.10.10:3306
  schema: puzzle
  user: root
  password: '********'
  charset: utf8mb4
  disable: false
allow-online-as-test: false
drop-test-temporary: true
only-syntax-check: false
sampling-statistic-target: 100
sampling: false
profiling: false
trace: false
explain: true
conn-time-out: 3
query-time-out: 30
delimiter: ;
log-level: 3
log-output: /dev/stderr
report-type: text
report-css: ""
report-javascript: ""
report-title: SQL优化分析报告
markdown-extensions: 94
markdown-html-flags: 0
ignore-rules:
- COL.011
rewrite-rules:
- delimiter
- orderbynull
- groupbyconst
- dmlorderby
- having
- star2columns
- insertcolumns
- distinctstar
blacklist: ""
max-join-table-count: 5
max-group-by-cols-count: 5
max-distinct-count: 5
max-index-cols-count: 5
max-total-rows: 9999999
max-query-cost: 9999
spaghetti-query-length: 2048
allow-drop-index: false
max-in-count: 10
max-index-bytes-percolumn: 767
max-index-bytes: 3072
table-allow-charsets:
- utf8
- utf8mb4
table-allow-engines:
- innodb
max-index-count: 10
max-column-count: 40
index-prefix: idx_
unique-key-prefix: uk_
max-subquery-depth: 5
max-varchar-length: 1024
explain-sql-report-type: pretty
explain-type: extended
explain-format: traditional
explain-warn-select-type:
- ""
explain-warn-access-type:
- ALL
explain-max-keys: 3
explain-min-keys: 0
explain-max-rows: 10000
explain-warn-extra:
- Using temporary
- Using filesort
explain-max-filtered: 100
explain-warn-scalability:
- O(n)
show-warnings: false
show-last-query-cost: false
query: SELECT * FROM products WHERE ppid>12
list-heuristic-rules: false
list-rewrite-rules: false
list-test-sqls: false
list-report-types: false
verbose: false
dry-run: true
max-pretty-sql-length: 1024

from soar.

martianzhang avatar martianzhang commented on May 29, 2024

如果您只有一个测试环境可以在配置文件中将online-dsn和test-dsn配置为同一个,且将allow-online-as-test配置为true。

如果还是报错可以将log-level设置为7级,看一下日志中的错误信息。

from soar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.