AnalyzeMySQL
所属分类:数据库系统
开发工具:Ruby
文件大小:15KB
下载次数:0
上传日期:2013-04-08 09:40:10
上 传 者:
sh-1993
说明: 一个以MySQL为中心的模式和数据分析器,具有用于添加新分析器插件的插件api。
(A MySQL focussed schema and data analyzer with a plugin api to add new analyzer plugins.)
文件列表:
.rspec (26, 2013-04-08)
AnalyzeMySQL.gemspec (1065, 2013-04-08)
CONTRIBUTORS.md (49, 2013-04-08)
Gemfile (108, 2013-04-08)
LICENSE (1097, 2013-04-08)
Rakefile (29, 2013-04-08)
bin (0, 2013-04-08)
bin\ams (1595, 2013-04-08)
conf (0, 2013-04-08)
conf\config.yml (605, 2013-04-08)
lib (0, 2013-04-08)
lib\AnalyzeMySQL.rb (1297, 2013-04-08)
lib\AnalyzeMySQL (0, 2013-04-08)
lib\AnalyzeMySQL\configuration.rb (89, 2013-04-08)
lib\AnalyzeMySQL\plugin (0, 2013-04-08)
lib\AnalyzeMySQL\plugin\base.rb (433, 2013-04-08)
lib\AnalyzeMySQL\plugins (0, 2013-04-08)
lib\AnalyzeMySQL\plugins\col_size_fits_content.rb (1801, 2013-04-08)
lib\AnalyzeMySQL\report (0, 2013-04-08)
lib\AnalyzeMySQL\report\base.rb (70, 2013-04-08)
lib\AnalyzeMySQL\report\pool.rb (202, 2013-04-08)
lib\AnalyzeMySQL\structure.rb (2398, 2013-04-08)
lib\AnalyzeMySQL\structure (0, 2013-04-08)
lib\AnalyzeMySQL\structure\column.rb (1279, 2013-04-08)
lib\AnalyzeMySQL\structure\index.rb (651, 2013-04-08)
lib\AnalyzeMySQL\structure\index_squence.rb (540, 2013-04-08)
lib\AnalyzeMySQL\structure\schema.rb (1669, 2013-04-08)
lib\AnalyzeMySQL\structure\table.rb (2040, 2013-04-08)
lib\AnalyzeMySQL\version.rb (44, 2013-04-08)
spec (0, 2013-04-08)
spec\fixtures (0, 2013-04-08)
spec\fixtures\data.sql (472, 2013-04-08)
spec\fixtures\schema.sql (487, 2013-04-08)
spec\spec_helper.rb (734, 2013-04-08)
# AnalyzeMySQL
You can read [http://blog.xenji.com/2013/04/mysql-analysis-with-analyzemysql.html](http://blog.xenji.com/2013/04/mysql-analysis-with-analyzemysql.html) for a small introduction and the mission behind it.
This little tool (or you might call it framework someday) intends to help with analyzing MySQL table structures.
I've built it for trivago, who have a primary MySQL database of > 230 tables with max row counts of (roughly)
100,000,000 for the bigger tables.
AnalyzeMySQL (ams) tends to help by objectifying the tables data structure and handling it via an API to every
plugin. Now each plugin can do it's work and contribute to a final report. This keeps things scalable and enables
you to write your own additions, based on the structure of your database.
## A first check
`col_size_fits_contet` is the first plugin. It checks the max(col) value against the column's definition and mangles the
definition if the value differs more than the configured percentage.
Example:
```
WARN -- : Table: bar / Column: foo :: maximum column content 9075*** is below 50% of it's max defined value of 9223372036854775807
```
## Installation
Install it by just cloning it. It is not yet ready to be released as installable gem. Edit the configuration to fit your
settings. The installation routine will change in the future, but I want to focus on stability first.
The config file enables you to declare everything you want and need, including a directory to put the reports and
a directory to include when searching for plugins.
Just run:
```
$ bundle install
$ bin/ams
```
ATTENTION: Depending on the plugins you choose, you will set the database under high load.
## Plugins
Put your plugins in `lib/AnalyzeMySQL/plugins` and use the `col_size_fits_content.rb` as an example.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
近期下载者:
相关文件:
收藏者: