Home > Archives > October 2007 Archive

October 2007 Archive

Stored Routine

  • October 31, 2007 6:33 PM

SP/SF作成時に、中で利用するテーブル名が間違っていても、エラーを返すのは、実行時だけ?
って、不便。

  • Comments (Close): 0
  • TrackBack (Close): 0

InnoDBの8CPU対応は5.0.30から?

  • October 30, 2007 5:58 PM
  • Comments (Close): 0
  • TrackBack (Close): 0

InnoDBでPartitioningするとFK使えなくなる?

  • October 30, 2007 5:03 PM

http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html

#

Foreign keys. Partitioned tables do not support foreign keys. This means that:

1.

Definitions of tables employing user-defined partitioning may not contain foreign key references to other tables.
2.

No table definition may contain a foreign key reference to a partitioned table.

The scope of these restrictions includes tables that use the InnoDB storage engine.

InnoDBでPartitionする意味→

今までは大量のデータを、巨大なテーブルから削除する際に、セカンダリインデックスがバッファプールにフィットし無い場合に非常に遅くなっていたが、パーティショニングで解決する。

MyISAMと同じくPARTITION BYが使える。

  • Comments (Close): 0
  • TrackBack (Close): 0

MySQL 5.1ではデフォルトでGeneral Query Log, Slow Query Logともにテーブルに出力される

  • October 29, 2007 3:39 PM
mysql> show variables like 'log_output';

+---------------+-------+

| Variable_name | Value |

+---------------+-------+

| log_output | TABLE |

+---------------+-------+

1 row in set (0.00 sec)

  • Comments (Close): 0
  • TrackBack (Close): 0

@@system_time_zoneでサーバーのタイムゾーンを確認できる

  • October 29, 2007 3:34 PM
mysql> select @@system_time_zone;

+--------------------+

| @@system_time_zone |

+--------------------+

| 東京 (標準時) |

+--------------------+

1 row in set (0.00 sec)

  • Comments (Close): 0
  • TrackBack (Close): 0

InnoDBのチューニング

  • October 26, 2007 5:17 PM
  • Comments (Close): 0
  • TrackBack (Close): 0

MySQL、グーグルが開発したコードを採用へ

  • October 25, 2007 12:09 PM
  • Comments (Close): 0
  • TrackBack (Close): 0

InnoDBメモ

  • October 23, 2007 9:24 PM

innodb_flush_method=O_DIRECT
とか、
スレーブではinnodb_flush_log_at_trx_commit=0
とか、もいずれ検討しないと。

thread_cacheとか、cache系も整理して。
  • Comments (Close): 0
  • TrackBack (Close): 0

サーバー変数(グローバルとセッション)の書き方

  • October 16, 2007 3:43 PM


@@global.sql_mode
@@session.sql_mode
show global variables
show session variables

mysql> select @@session.sql_mode; +--------------------+ | @@session.sql_mode | +--------------------+ | | +--------------------+ 1 row in set (0.00 sec)

mysql> select @@global.sql_mode;
+----------------------------------------------------------------+
| @@global.sql_mode |
+----------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+----------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show vaiables like 'sql_mode';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'vaiab
les like 'sql_mode'' at line 1
mysql> show variables like 'sql_mode';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_mode | |
+---------------+-------+
1 row in set (0.00 sec)

mysql> show global variables like 'sql_mode';
+---------------+---------------------------------------------------------------
-+
| Variable_name | Value
|
+---------------+---------------------------------------------------------------
-+
| sql_mode | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
+---------------+---------------------------------------------------------------
-+
1 row in set (0.00 sec)

  • Comments (Close): 0
  • TrackBack (Close): 0

Index of all entries

Home > Archives > October 2007 Archive

Search
Feeds

Return to page top