13 件中 1 - 10 件を表示
次の 3 件 »
Displaying posts with tag: RDBMS (reset)
TempTable in MySQL8.0のメモ

MySQL8.0.16のリリースノートに以下の様にTempTableの処理に変更が加わっていたので仕様を把握する為に、追加されたパラメータと挙動に関して確認してみました。見ていると、8.0.23での変更や、8.0.26におけるtemptable_use_mmapのdeprecate notice,8.0.28における変更もあるようです。なので、最新の挙動は8.0.31以降で再確認します。結論としては、8.0.28以降ではTempTable, MEMORYストレージエンジン共にtmp_table_sizeを適切に設定する必要あり。

InnoDB: When the amount of memory occupied by the TempTable storage engine exceeds the limit defined by the temptable_max_ram variable, the TempTable storage engine allocates space for internal in-memory temporary tables as memory-mapped temporary files. This behavior is now …

[さらに読む]
MySQLアカウント権限とpartial_revokesについて

MySQL8.0.16のリリースノートにアカウントに広い範囲で権限を付与した後に、特定の権限だけREVOKEする方法についての機能追加が実装されていたので確認してみました。

Previously, it was not possible to grant privileges that apply globally except for certain schemas. This is now possible if the new partial_revokes system variable is enabled. For example, the following statements enable an account to select from or insert into any table except those in the mysql system schema:

Changes in MySQL 8.0.16 (2019-04-25, General Availability)

[さらに読む]
Statement_ID and events_statements_テーブル

MySQLを運用する中で、SYS Schemaを利用してインスタンスの状態を確認する事が増えていますが、Performance Schemaを直接見てSQL処理を確認するケースも相変わら多いか思います。まだ具体的にどの様に活用していくかは目途が付いていませんが、MySQL8.0.14のリリースノートに以下の様にSTATEMENT_IDが付与される様になったとの記載があったので念の為に概要だけ確認しておきます。

SYS Schema

The Performance Schema statement event tables (events_statements_current, events_statements_history, and events_statements_history_long) now have a STATEMENT_ID column that indicates the query ID maintained by the server at the SQL level. Column values are unique for the server instance because they are generated using a global counter that is incremented atomically.

[さらに読む]
MySQL 管理インタフェース

MySQL8.0.14のリリースノートに以下の、管理用の接続が追加されたとの記載がありました。max_connectionに到達してしまい「Too many connections」が出た時の対策として活用出来ると思い、基本的な機能を確認してみました。

MySQL Server now permits a TCP/IP port to be configured specifically for administrative connections. This provides an alternative to the single administrative connection that is permitted on the network interfaces used for ordinary connections even when max_connections connections are already established. The administrative network interface has these characteristics:

Changes in MySQL 8.0.14 (2019-01-21, General Availability)

管理ネットワークインタフェースで TCP/IP 接続をリスニングする IP …

[さらに読む]
デュアルパスワード

MySQL8.0.14のリリースノートに以下の様に1つのアカウントに2つのパスワードを持つ事が出来る様になったとの記載があったので軽くレビューしてみました。オフィシャルマニュアルに記載がある様に定期的なパスワードは必要ですが、これまではまとめて1回のメンテナンスで全てのアプリケーションの接続で利用されているパスワードを変更するか、同じ権限でアカウントをもう1つ用意して、1つ1つ入れ替える事が必要でしたが、パスワードを2つ持てるのであれば、タイミングを見て複数のアプリケーションのパスワードを段階的に変更する事が出来るので有難い選択肢ですね。

[さらに読む]
Transaction and Temporary Table

In Case of MySQL

MySQL8.0.13のリリースノートに以下の記載があったので部分的ではありますが、CREATE TEMPORARYテーブルをトランザクション内で実行し確認してみました。

Previously, CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE statements were not supported inside transactions, procedures, functions, or triggers when using GTIDs (that is, when the enforce_gtid_consistency system variable is set to ON). It was possible to use these statements with GTIDs enabled, but only outside of any transaction, and only with autocommit=1.

From MySQL 8.0.13, this restriction has been removed when binlog_format is set to ROW or MIXED. With row-based logging in use, CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE statements can now be used inside transactions, procedures, functions, or triggers when GTIDs are enabled. When binlog_format is set to STATEMENT, the restriction remains. Because of …

[さらに読む]
スキャン範囲アクセス方法のスキップ

MySQL8.0.13のリリースノートに遡って見て見ると、以下の様な記述があったのでどのような処理なのか?どれだけパフォーマンスに影響があるのかを確認してみました。

Optimizer Notes: The optimizer now supports a Skip Scan access method that enables range access to be used in previously inapplicable situations to improve query performance. For more information, see Skip Scan Range Access Method. Thanks to Facebook for the patch on which this access method is based. (Bug #26976512, Bug #88103)

Changes in MySQL 8.0.13 (2018-10-22, General Availability)

Skip Scan Range Access Method (スキャン範囲アクセス方法のスキップ)

このクエリーを実行するために、MySQL …

[さらに読む]
 Query Rewrite Plugin

 Query Rewrite Pluginは以前から提供されていましたが、8.0.12以降でSELECT以外のDMLをサポートしたとの事でしたので、念の為に挙動を確認してみます。他に対応方法が無い場合以外で、積極的に利用するケースは思い付きませんが、選択肢の一つとして認識しておいて良いかと思います。

install_rewriter.sql: Rewriter プラグインとその関連要素をインストールするには、このスクリプトを選択します。

uninstall_rewriter.sql: Rewriter プラグインとその関連要素をアンインストールするには、このスクリプトを選択します。

Previously, the Rewriter query rewrite …

[さらに読む]
MySQL ibd2sdi Utility

通常運用時には使う事は無いと思いますが、メタデータ参照出来ないケースやMySQLのAuthenticationエラーでデータディクショナリから確認出来ない場合等に使える方法なのかなと思い。念の為に、基本的な挙動のみ列挙しておきます。MySQL8.0.11からJSON Prettyフォーマットオプションが追加されDefaultに成った様です。

シリアライズディクショナリ情報 (SDI)
シリアライズされた形式のディクショナリオブジェクトメタデータ。 SDI は JSON 形式で格納されます。MySQL 8.0.3 では、SDI は一時テーブルスペースおよび undo テーブルスペースファイルを除くすべての InnoDB テーブルスペースファイルに存在します。 SDI …

[さらに読む]
MySQL8.0以降における数値データ型

MySQL8.0がGA(Changes in MySQL 8.0.11 (2018-04-19, General Availability)になってから4年以上が過ぎていますが、色々な機能追加や機能のDeprecate(廃止)やDeprecateに対する警告が出ています。その中でも、テーブル生成する時にも以下の様なWarning 1681が出て来るようになったので、改めて再確認してみます。

整数データ型における幅表示の非推奨

MySQL 8.0.17 では、整数データ型の表示幅属性は非推奨になりました。将来のバージョンの MySQL ではサポートされなくなる予定です。

11.1.1 数値データ型の構文

MySQL 8.0.30での確認

[さらに読む]
13 件中 1 - 10 件を表示
次の 3 件 »