rabbit-slide-clear-code-mroonga-introduction 2016.12.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rabbit +1 -0
- data/README.rd +45 -0
- data/Rakefile +61 -0
- data/config.yaml +25 -0
- data/data/search-ja.gnuplot +35 -0
- data/data/search-ja.tsv +5 -0
- data/data/style.gnuplot +29 -0
- data/images/search-mroonga-innodb.pdf +0 -0
- data/mroonga-introduction.rab +44 -0
- data/pdf/mroonga-introduction-mroonga-introduction.pdf +0 -0
- metadata +83 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cf53b21eadf2aecb386e4328996cb48ff30bedf2
|
4
|
+
data.tar.gz: d35e1e1ee8d4b1d9eb941de319ea48ca7cd74bc4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 88085f6050f0c85ce5dda43e5a70f7f2639d0f45cf49959880fa81c11f93ea2114146e5ca1d032592ea083cec25047457dd826173610b1bcdb1f4c22e7db96ed
|
7
|
+
data.tar.gz: ba1a5415600842b69fd4941a23c4c3dc47193bf6b579951b174b1eebf2807e0fdfd477bdb0f13d048355abe4805d3e8b603afed9f5452ebbddb964243baa1fe9
|
data/.rabbit
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
mroonga-introduction.rab
|
data/README.rd
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
= Mroongaの紹介
|
2
|
+
|
3
|
+
Mroonga紹介用資料。
|
4
|
+
|
5
|
+
== ライセンス
|
6
|
+
|
7
|
+
=== スライド
|
8
|
+
|
9
|
+
CC BY-SA 4.0
|
10
|
+
|
11
|
+
著作者情報は次のどれかを使ってください。
|
12
|
+
|
13
|
+
* 株式会社クリアコード
|
14
|
+
* クリアコード
|
15
|
+
|
16
|
+
=== 画像
|
17
|
+
|
18
|
+
==== GroongaとMroongaのロゴ
|
19
|
+
|
20
|
+
CC BY 3.0
|
21
|
+
|
22
|
+
著作者:Groongaプロジェクト
|
23
|
+
|
24
|
+
スライドの各ページのヘッダーおよびいくつかのページ中で使用しています。
|
25
|
+
|
26
|
+
== 作者向け
|
27
|
+
|
28
|
+
=== 表示
|
29
|
+
|
30
|
+
rake
|
31
|
+
|
32
|
+
=== 公開
|
33
|
+
|
34
|
+
rake publish
|
35
|
+
|
36
|
+
== 閲覧者向け
|
37
|
+
|
38
|
+
=== インストール
|
39
|
+
|
40
|
+
gem install rabbit-slide-clear-code-mroonga-introduction
|
41
|
+
|
42
|
+
=== 表示
|
43
|
+
|
44
|
+
rabbit rabbit-slide-clear-code-mroonga-introduction.gem
|
45
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
require "rabbit/task/slide"
|
2
|
+
|
3
|
+
# Edit ./config.yaml to customize meta data
|
4
|
+
|
5
|
+
spec = nil
|
6
|
+
Rabbit::Task::Slide.new do |task|
|
7
|
+
spec = task.spec
|
8
|
+
spec.files += Dir.glob("data/**/*.*")
|
9
|
+
spec.files += Dir.glob("images/**/*.*")
|
10
|
+
# spec.files -= Dir.glob("private/**/*.*")
|
11
|
+
spec.add_runtime_dependency("rabbit-theme-clear-code")
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Tag #{spec.version}"
|
15
|
+
task :tag do
|
16
|
+
sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
|
17
|
+
sh("git", "push", "--tags")
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
key_graphs = []
|
22
|
+
plots = Pathname.glob("data/**/*.gnuplot")
|
23
|
+
plots.each do |plot|
|
24
|
+
output_base_dir = plot.dirname.to_s.gsub(/\Adata/, "images")
|
25
|
+
loaded_plots = []
|
26
|
+
graphs = []
|
27
|
+
data = []
|
28
|
+
|
29
|
+
plot.open do |plot_file|
|
30
|
+
plot_file.each_line do |line|
|
31
|
+
case line.chomp
|
32
|
+
when /\Aload "(.*?)"\z/
|
33
|
+
loaded_plots << "#{plot.dirname}/#{$1}"
|
34
|
+
when /"(.*?\.tsv)"/
|
35
|
+
data << "#{plot.dirname}/#{$1}"
|
36
|
+
when /\Aset output "(.*?)"\z/
|
37
|
+
graphs << "#{output_base_dir}/#{$1}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
next if graphs.empty?
|
42
|
+
|
43
|
+
key_graph = graphs.first
|
44
|
+
key_graphs << key_graph
|
45
|
+
file key_graph => [plot.to_s, *loaded_plots, *data] do
|
46
|
+
cd(plot.dirname) do
|
47
|
+
sh("gnuplot", plot.basename.to_s)
|
48
|
+
end
|
49
|
+
graphs.each do |graph|
|
50
|
+
mkdir_p(File.dirname(graph))
|
51
|
+
mv("#{plot.dirname}/#{File.basename(graph)}",
|
52
|
+
graph)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "Generate graphs"
|
58
|
+
task :graph => key_graphs
|
59
|
+
|
60
|
+
task :run => :graph
|
61
|
+
task :pdf => :graph
|
data/config.yaml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
id: mroonga-introduction
|
3
|
+
base_name: mroonga-introduction
|
4
|
+
tags:
|
5
|
+
- rabbit
|
6
|
+
- mroonga
|
7
|
+
- mysql
|
8
|
+
- mariadb
|
9
|
+
presentation_date:
|
10
|
+
version: 2016.12.26.0
|
11
|
+
licenses:
|
12
|
+
- CC-BY-SA-4.0
|
13
|
+
- CC-BY-3.0
|
14
|
+
slideshare_id:
|
15
|
+
speaker_deck_id:
|
16
|
+
ustream_id:
|
17
|
+
vimeo_id:
|
18
|
+
youtube_id:
|
19
|
+
author:
|
20
|
+
markup_language: :rd
|
21
|
+
name: ClearCode
|
22
|
+
email: rubygems@clear-code.com
|
23
|
+
rubygems_user: clear-code
|
24
|
+
slideshare_user:
|
25
|
+
speaker_deck_user:
|
@@ -0,0 +1,35 @@
|
|
1
|
+
load "style.gnuplot"
|
2
|
+
|
3
|
+
set datafile missing "NaN"
|
4
|
+
|
5
|
+
set style data histogram
|
6
|
+
set style histogram cluster gap 1
|
7
|
+
set style fill solid border -1
|
8
|
+
set boxwidth 0.9
|
9
|
+
|
10
|
+
set bmargin 4
|
11
|
+
|
12
|
+
set xlabel "クエリー"
|
13
|
+
set ylabel " 実行時間(秒)\n(短いほど速い)"
|
14
|
+
|
15
|
+
set label 1 \
|
16
|
+
"データ:日本語版Wikipedia" \
|
17
|
+
at first -1,380 left
|
18
|
+
set label 2 \
|
19
|
+
"レコード数:約185万" \
|
20
|
+
at first -1,330 left
|
21
|
+
set label 3 \
|
22
|
+
"InnoDBはクエリーによっては遅い" \
|
23
|
+
textcolor "#ef2929" \
|
24
|
+
at first -1,225 left
|
25
|
+
set label 4 \
|
26
|
+
"Mroongaは安定して速い" \
|
27
|
+
textcolor "#ef2929" \
|
28
|
+
at first -1,25 left
|
29
|
+
set output "search-mroonga-innodb.pdf"
|
30
|
+
plot "search-ja.tsv" using 2:xtic(1) \
|
31
|
+
title columnheader \
|
32
|
+
linestyle 5, \
|
33
|
+
"search-ja.tsv" using 6 \
|
34
|
+
title columnheader \
|
35
|
+
linestyle 1
|
data/data/search-ja.tsv
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
Query Mroonga "N hits(Mroonga)" "InnoDB ngram" "N hits(InnoDB ngram)" "InnoDB MeCab" "N hits(InnoDB MeCab)"
|
2
|
+
"PostgreSQL\nOR\nMySQL" 0.02 368 NaN NaN 0.005 368
|
3
|
+
データベース 0.09 17180 36 17180 0.03 16108
|
4
|
+
テレビアニメ 0.1 22954 182 22954 380 33525
|
5
|
+
日本 0.2 627724 1.2 627724 1.3 568978
|
data/data/style.gnuplot
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
set terminal pdfcairo enhanced color transparent rounded
|
2
|
+
|
3
|
+
set key outside center top horizontal reverse Left samplen 2
|
4
|
+
unset border
|
5
|
+
set xtics scale 0
|
6
|
+
set ytics scale 0
|
7
|
+
set grid ytics linewidth 1 linetype -1
|
8
|
+
|
9
|
+
set key font "Sans,18"
|
10
|
+
set title font "Sans,18"
|
11
|
+
set xlabel font "Sans,18"
|
12
|
+
set ylabel font "Sans,18"
|
13
|
+
set label 1 font "Sans,18"
|
14
|
+
set label 2 font "Sans,18"
|
15
|
+
set label 3 font "Sans,18"
|
16
|
+
set label 4 font "Sans,18"
|
17
|
+
set label 5 font "Sans,18"
|
18
|
+
set label 6 font "Sans,18"
|
19
|
+
|
20
|
+
set style line 1 lt 1 lc rgbcolor "#3465a4" lw 2.5 pt 7 ps 1
|
21
|
+
set style line 2 lt 1 lc rgbcolor "#edd400" lw 2.5 pt 7 ps 1
|
22
|
+
set style line 3 lt 1 lc rgbcolor "#888a85" lw 2.5 pt 5 ps 1
|
23
|
+
set style line 4 lt 1 lc rgbcolor "#f57900" lw 2.5 pt 5 ps 1
|
24
|
+
set style line 5 lt 1 lc rgbcolor "#ad7fa8" lw 2.5 pt 9 ps 1
|
25
|
+
set style line 6 lt 1 lc rgbcolor "#4e9a06" lw 2.5 pt 9 ps 1
|
26
|
+
set style line 7 lt 1 lc rgbcolor "#ef2929" lw 2.5 pt 1 ps 1
|
27
|
+
set style line 8 lt 1 lc rgbcolor "#5c3566" lw 2.5 pt 1 ps 1
|
28
|
+
set style line 9 lt 1 lc rgbcolor "#c17d11" lw 2.5 pt 3 ps 1
|
29
|
+
set style line 10 lt 1 lc rgbcolor "#dce775" lw 2.5 pt 3 ps 1
|
Binary file
|
@@ -0,0 +1,44 @@
|
|
1
|
+
= Mroongaの紹介
|
2
|
+
|
3
|
+
: author
|
4
|
+
クリアコード
|
5
|
+
: theme
|
6
|
+
clear-code
|
7
|
+
|
8
|
+
= MySQLの課題
|
9
|
+
|
10
|
+
* (('wait'))組込全文検索機能
|
11
|
+
* 5.6から日本語対応だが遅い
|
12
|
+
|
13
|
+
(('wait'))
|
14
|
+
(('tag:center'))
|
15
|
+
↓\n
|
16
|
+
Mroonga:日本語対応で速い
|
17
|
+
|
18
|
+
= 速度
|
19
|
+
|
20
|
+
# image
|
21
|
+
# src = images/search-mroonga-innodb.pdf
|
22
|
+
# relative_width = 100
|
23
|
+
|
24
|
+
== スライドプロパティ
|
25
|
+
|
26
|
+
: enable-title-on-image
|
27
|
+
false
|
28
|
+
|
29
|
+
= 速い理由
|
30
|
+
|
31
|
+
高速な\n
|
32
|
+
フレーズ検索\n
|
33
|
+
(('note:フレーズ検索:連続した単語を検索(日本語全文検索では必須)'))\n
|
34
|
+
(('note:例:「テレビアニメ」=「テレビ」+「アニメ」が連続'))
|
35
|
+
|
36
|
+
= さらに速い
|
37
|
+
|
38
|
+
* よく使うSQLを最適化
|
39
|
+
* (({COUNT(*)}))\n
|
40
|
+
→不要な列を読まない
|
41
|
+
* (({ORDER BY LIMIT}))\n
|
42
|
+
→不要な行を読まない
|
43
|
+
* 更新中も検索性能の劣化がない
|
44
|
+
* 更新中も検索処理をブロックしない
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rabbit-slide-clear-code-mroonga-introduction
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2016.12.26.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ClearCode
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rabbit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rabbit-theme-clear-code
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Mroonga紹介用資料。
|
42
|
+
email:
|
43
|
+
- rubygems@clear-code.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".rabbit"
|
49
|
+
- README.rd
|
50
|
+
- Rakefile
|
51
|
+
- config.yaml
|
52
|
+
- data/search-ja.gnuplot
|
53
|
+
- data/search-ja.tsv
|
54
|
+
- data/style.gnuplot
|
55
|
+
- images/search-mroonga-innodb.pdf
|
56
|
+
- mroonga-introduction.rab
|
57
|
+
- pdf/mroonga-introduction-mroonga-introduction.pdf
|
58
|
+
homepage: http://slide.rabbit-shocker.org/authors/clear-code/mroonga-introduction/
|
59
|
+
licenses:
|
60
|
+
- CC-BY-SA-4.0
|
61
|
+
- CC-BY-3.0
|
62
|
+
metadata: {}
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
requirements: []
|
78
|
+
rubyforge_project:
|
79
|
+
rubygems_version: 2.5.2
|
80
|
+
signing_key:
|
81
|
+
specification_version: 4
|
82
|
+
summary: Mroongaの紹介
|
83
|
+
test_files: []
|