如何调优 Informix 数据库性能
我想知道如何执行以下一般步骤:
- 在哪里找到慢 SQL
- 如何调试 SQL(包括函数)
- 如何
- 在使用“更新统计信息”时正确创建索引,何时应该使用 HIGH 或 LOW,为什么?
我将写一篇关于这个主题的论文;欢迎任何帮助。
I want to how to do following general step:
- where to find slow SQL
- how to debug SQL (including functions)
- how to create index properly
- when using "update statistics", when should I use HIGH or LOW, and why?
I am going to write a paper about this topic; any help is welcomed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的是,一个起点是 Informix 性能调优指南,Informix 11.70 信息中心。特别是,它解释了您需要了解的有关更新统计信息以及自动更新统计信息的大部分内容。
对于问题 3,在某种程度上,没有太多内容 - 您遵循手册中的语法并且它可以工作。我猜你更关心是否应该在表上创建索引;这在一定程度上是问题 1 和 2 的后续。
有多种方法可以找到慢 SQL。如果您有 OAT(OpenAdmin 工具),那么它可以报告最慢的查询。或者,您可以查看 SET EXPLAIN。
如果您有 Informix 11.70,则有一个内置的 SPL(存储过程语言)调试工具。对于早期版本,Server Studio 和 Sentinel 提供一些支持。您还可以查看内置的 TRACE 工具和相关的 SET DEBUG FILE 语句,但它们往往很难解释,并且不能真正为您提供性能信息(更多的是正确与不正确功能的问题)。
One place to start is, funnily enough, the Informix Performance Tuning Guide, one section of the Informix 11.70 Information Centre. In particular, it explains most of what you need to know about UPDATE STATISTICS, and also about automatic update statistics.
For question 3, at one level, there isn't much to it - you follow the syntax from the manuals and it works. I'm guessing though that you're more concerned with whether you should create an index on a table; this would in part follow on from questions 1 and 2.
There are a variety of ways to find slow SQL. If you have OAT (OpenAdmin Tool), then it has ways to report the slowest queries. Alternatively, you can look to SET EXPLAIN.
If you have Informix 11.70, then there is a built-in SPL (stored procedure language) debugging facility. For earlier versions, Server Studio and Sentinel has some support. You can also look at the built-in TRACE facility and the related SET DEBUG FILE statement, but they tend to be tricky to interpret, and don't really give you performance information (more a question of correct vs incorrect functioning).