加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

是否有一个工具来配置sqlite查询?

发布时间:2020-12-12 19:18:39 所属栏目:百科 来源:网络整理
导读:我使用一个SQLite数据库,并希望加快我的查询,可能与索引或通过重组它们。 是否有一个工具来配置查询,这可能有助于我决定哪里的事情正在减速? 我知道我可以只是输入查询到一个工具,如SQLite管理员来计算他们,但我正在寻找一些更有系统的东西 – 可能是
我使用一个SQLite数据库,并希望加快我的查询,可能与索引或通过重组它们。

是否有一个工具来配置查询,这可能有助于我决定哪里的事情正在减速?

我知道我可以只是输入查询到一个工具,如SQLite管理员来计算他们,但我正在寻找一些更有系统的东西 – 可能是在后台,查看我输入的所有查询期间,给出任何瓶颈的故障。

你在这里有很多问题。要查看运行的查询和它们需要多长时间,您需要修改sqlite3.dll(如果应用程序正在链接),或者如果它是您自己的应用程序,您可以将其写入代码更容易(我们这样做,查询,事务,定时等)。

对于单个查询分析,可以使用EXPLAIN。它不会告诉你查询中每个步骤的时间,但它会告诉你如何执行查询。

http://www.sqlite.org/lang_explain.html

An SQL statement can be preceded by the keyword “EXPLAIN” or by the phrase “EXPLAIN QUERY PLAN”. Either modification causes the SQL statement to behave as a query and to return information about how the SQL statement would have operated if the EXPLAIN keyword or phrase had been omitted.

When the EXPLAIN keyword appears by itself it causes the statement to behave as a query that returns the sequence of virtual machine instructions it would have used to execute the command had the EXPLAIN keyword not been present. When the EXPLAIN QUERY PLAN phrase appears,the statement returns high-level information about what indices would have been used.

The output from EXPLAIN and EXPLAIN QUERY PLAN is intended for interactive analysis and troubleshooting only. The details of the output format are subject to change from one release of SQLite to the next. Applications should not use EXPLAIN or EXPLAIN QUERY PLAN since their exact behavior is undocumented,unspecified,and variable.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读