1967 件中 1011 - 1020 件を表示
« 前の 10 件 | 次の 10 件 »
Displaying posts with tag: MySQL (reset)
MySQL5.7 with FTS Mecab

mecabプラグイン
MySQL5.7からmecabプラグインが利用出来るようになるので、基本的な動作確認をしました。
現状では、eucjpms (ujis), cp932 (sjis), and utf8 (utf8mb4)のみ対応している状態です。

Mecabについて
http://ja.wikipedia.org/wiki/MeCab

参考: 
InnoDB Full-Text: MeCab Parser
http://planet.mysql.com/entry/?id=5989321

初期設定
Plugin Directoryにモジュールや設定ファイルがあります。

[root@misc01 mecab]# ls -l …
[さらに読む]
MySQL5.7 with FTS NGRAM(IN BOOLEAN MODE)

一つ前のPOSTで検証したデータでそのまま、NGRAMにてIN BOOLEAN MODEを使い検索してみました。

Natural Language
自然言語処理
By default or with the IN NATURAL LANGUAGE MODE modifier,
the MATCH() function performs a natural language search for a string against a text collection.
– text searched for is converted to a union of n-gram values. For example, ‘sql’ is converted to ‘sq ql’ (with a default token size of 2 or bigram).

Boolean
真(true)と偽(false)の2種類の値だけを扱う型 (“+”、”-“で条件設定可能)
MySQL can perform boolean full-text searches using the IN BOOLEAN MODE modifier.
With this modifier, certain characters have special meaning at the beginning or end of words in the search …

[さらに読む]
MySQL5.7 with FTS NGRAM(NATURAL LANGUAGE MODE)

MySQL5.7から実装されるInnoDBの全文検索 in CJKモードの挙動について。
Natural Language Full-Text Searchsについて。

12.9.1 Natural Language Full-Text Searches
http://dev.mysql.com/doc/refman/5.7/en/fulltext-natural-language.html
By default or with the IN NATURAL LANGUAGE MODE modifier,
the MATCH() function performs a natural language search for a string against
a text collection. A collection is a set of one or more columns included in a FULLTEXT index.
The search string is given as the argument to AGAINST().

テストバージョン

検証用DB、テーブル、データの作成。

[さらに読む]
MySQLのperformance_schemaをフルパワーにするとどんな情報が見られるのか

日々の覚書: MySQLのperformance_schemaでどれくらいの情報が見られるのか の続き。


* events_stages_summary_by_account_by_event_name
* events_stages_summary_by_host_by_event_name
* events_stages_summary_by_thread_by_event_name
* events_stages_summary_by_user_by_event_name
* events_stages_summary_global_by_event_name

mysql> SELECT * FROM events_stages_summary_by_account_by_event_name WHERE count_star <> 0 ORDER BY sum_timer_wait DESC LIMIT 3;
+------------+-----------+-------------------------+------------+----------------+----------------+----------------+----------------+
| USER | HOST | EVENT_NAME | COUNT_STAR | SUM_TIMER_WAIT | MIN_TIMER_WAIT | AVG_TIMER_WAIT | MAX_TIMER_WAIT | …
[さらに読む]
MySQLのperformance_schemaでどれくらいの情報が見られるのか

MySQL :: MySQL 5.6 Reference Manual :: 22 MySQL Performance Schema

5.6以降「よくなったよ!」「確かにね! でもメモリー」「」みたいな感じで扱われて結局まだONにしているインスタンスの少ないPerformance Schemaなのでちょっと練習中。

tpcc-mysqlとかでやると割と綺麗なクエリーをしているので面白い情報が出ない(ibdata1のfsyncに時間がかかってることなんて知ってるよ! って感じになる)ので、isucon2のアプリで試してみることにしますた。モリスさん++

livedoor Techブログ : 自家製 #isucon2 のつくりかた


[さらに読む]
MySQL5.7.6DMR準備

MySQL5.7.6DMRが今月リリースされて、色々な機能追加や改善が施されているので、
DMRのうちに少しずつ検証してRCとGAに備えたいと思います。
とりあえず、本日は初期設定まで。

2015年3月現在

MySQL 5.7 Release Notes
http://dev.mysql.com/doc/relnotes/mysql/5.7/en/index.html

ダウンロードサイトからDMRをダウンロードしてきてあります。
mysql-5.7.6-m16-linux-glibc2.5-x86_64.tar.gz

[root@misc01 admin]# cd /usr/local/
[root@misc01 local]# ls -l
合計 545048
drwxr-xr-x. 2 root  root          6  6月 10  2014 bin
drwxr-xr-x. 2 root  root          6  6月 10  2014 etc
drwxr-xr-x. 2 root  root …
[さらに読む]
FLUSH TABLES WITH READ LOCKについて

FLUSH TABLES WITH READ LOCKをバックグラウンドで実行する処理がある場合に、
長時間実行しているバッチなどの処理があると、後から実行されるQueryが待たされるケースがある。
そんな、話を多からず、少なからず質問頂くので一応メモとして動作を記録。

通常は、データベース側の処理はDurationは短いので問題無いですが。。。
長時間バッチが実行されるような処理がある場合を避けて、FLUSH TABLES WITH READ LOCKを含む処理を実行するのが良さそうです。
MyISAMが全て無くなればまた、少しだけ選択肢が増えそうです。

[さらに読む]
MySQL 5.7でやっと(?)1テーブル複数トリガーが仕掛けられるようになった

As of MySQL 5.7.2, it is possible to define multiple triggers for a given table that have the same trigger event and action time. For example, you cannot have two BEFORE UPDATE triggers for a table. By default, triggers that have the same trigger event and action time activate in the order they were created. To affect trigger order, specify a trigger_order clause that indicates FOLLOWS or PRECEDES and the name of an existing trigger that also has the same trigger event and action time. With FOLLOWS, the new trigger activates after the existing trigger. With PRECEDES, the new trigger activates before the existing trigger.MySQL :: MySQL 5.7 Reference Manual :: 13.1.16 CREATE TRIGGER Syntax


試してみよう。

5.6のフツーの動作は

mysql56> CREATE TRIGGER before_insert_1 BEFORE INSERT ON t1 …
[さらに読む]
2015年版 InnoDB Monitorの仲間たち(InnoDBエンジン本体のアレ)

日々の覚書: InnoDB Monitorの仲間たち(InnoDBエンジン本体のアレ) で"CREATE TABLE innodb_monitor .."的なものを紹介しました。あれから2年。

というかよく調べてみたら1年前。

MySQL :: MySQL 5.7 Release Notes :: Changes in MySQL 5.7.4 (2014-03-31, Milestone 14)

InnoDB: New global configuration parameters, innodb_status_output and innodb_status_output_locks, allow you to dynamically enable and disable the standard InnoDB Monitor and InnoDB Lock Monitor for periodic output. Previously, enabling and disabling these monitors for periodic output required creating and dropping specially named tables (innodb_monitor and innodb_lock_monitor). For additional information, see …

[さらに読む]
MySQL 5.7.6のgenerated columnは関数インデックスの夢を見るか

MySQL 5.7.6-m16で導入されたgenerated columnについてメモ。タイトルでしゃらっと関数インデックスとか言っているけれど、俺はその機能を知らない。

MySQL :: MySQL 5.7 Reference Manual :: 13.1.14 CREATE TABLE Syntax

generated columnはあるカラムの値に関数を噛ませた結果をカラムとして実体化できたり、実体化せずに毎回計算できたりするカラム定義のことらしくて、


mysql57> CREATE TABLE t1 (num int, val varchar(32)) Engine = MyISAM;
Query OK, 0 rows affected (0.01 sec)

mysql57> INSERT INTO t1 SET num = 1, val = 'one';
Query OK, 1 row affected (0.00 sec)

mysql57> SELECT * FROM t1;
+-----+------+
| num | val |
+-----+------+
| 1 | …
[さらに読む]
1967 件中 1011 - 1020 件を表示
« 前の 10 件 | 次の 10 件 »