Oracle神谕

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  284 随笔 :: 9 文章 :: 106 评论 :: 0 Trackbacks

SQL Profiler Introduction

This is a quickly hacked tool to do statistics(统计) on SELECT queries in order to know where it is most efficient to create indexes.  目的是最有效的创建索引.

This small tool, released under an Apache-based license connects to the P6Spy JDBC logger and displays in real time the queries going to the database. It uses an integrated SQL parser to build statistics on the most accessed tables and columns and can generate SQL index creation files. Other information is also gathered and displayed, such as the request time for a single request, for a class of request, and for all the requests. Sorting may be done on these views to detect(察觉) database problems efficiently.


This tool can be very useful when you have a big volume of queries that you need to analyze not one by one一个接一个 (meaning that the specific time isn't that much of interest), but rather(若非) when you want to know what "group" of queries is taking a lot of time, such as queries on the same tables and columns but with different query values. The integrated SQL parser (built with ANTLR) is used to analyze the incoming SELECT queries.

The Swing GUI was based on Apache's Log4J Chainsaw, but all the bugs are mine. Also contributors are welcome to test, make new suggestions, give their opinion and submit patches.

posted on 2005-06-28 14:57 java世界畅谈 阅读(375) 评论(1)  编辑  收藏 所属分类: 性能分析

评论

# re: SQL Profiler Introduction 2006-01-15 11:38 felice
不错,试用了一下,确是很不错,计划在我的项目组中推广  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: