Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 2211 to 2220 of 3187 « Previous | Next »
Merge java hashcode function to mysql5.1(UDF)


很多应用程序基于java的hashcode方法,因此应用使用java的hashcode算法,但是在数据库层需要做一些与应用层次相同的hash操作,例如数据迁移操作,但是目前mysql没有提供很好的hashcode的方法,因此将java的hashcode算法整合到mysql5.1中去,作为mysql的hashcode函数使用,mysql的UDF函数代码可以从下面的URL获取源代码(在使用的过程中遇到问题,请给我留言):
http://forge.mysql.com/tools/tool.php?id=335

由于java的hashcode出来的值是一个有符号的数字,因此插入数据库的时候,需要重写下java的hashcode函数,java的源代码如下:
/**
* overload
* @param input
* @return
*/
public static long hashcode(String input) {

long MAX_VALUE = 0xffffffffL;
int …

[さらに読む]
[mysql]『MySQL徹底入門第3版』が来週出ます

MySQL徹底入門 第3版 ?5.5新機能対応? 作者: 遠藤俊裕,坂井恵,館山聖司,鶴長鎮一,とみたまさひろ,班石悦夫,松信嘉範 出版社/メーカー: 翔泳社 発売日: 2011/08/26 メディア: 大型本 購入: 1人 クリック: 24回 この商品を含むブログ (5件) を見る  『MySQL徹底入門第2版』が出版されてから5年半。MySQLバージョン5.5に対応した『第3版』が、いよいよ出版されます。  第2版は今読み返してみても、この動きの速い業界内でとても5年半前の本だとは ...

『MySQL徹底入門第3版』が来週出ます

MySQL徹底入門 第3版 ?5.5新機能対応?

 『MySQL徹底入門第2版』が出版されてから5年半。 …

[さらに読む]
Non-cryptographic hash function(UDF function) for mysql5.1

Some times, we want to use a hash funtion which is non-cryptographic,only create a number value,but mysql can't provide it, so I merge the "One At A Time hashing function" into mysql5.1,it  was originally created by Bob Jenkins.you can get my mysql hash function code from follow url:
http://forge.mysql.com/tools/tool.php?id=334

if you want use it in java and mysql,I modify the c code to java as following:

public static long hash32(String input) {            try {                  long hashend = 0L;                  int hash = …

[さらに読む]
MySQL 5.6 Feedback

To follow up on a post by Dave --

The MySQL Community Team would like your feedback about MySQL 5.6 ! What are you excited to see and test? What have you tested and benchmarked? Did you previously see the advantages of going to MySQL 5.5 and now eager to try 5.6? What are your favorite new features: Full Text Search InnoDB tables, Binary Log API, Binary Log Group Commit, multi-thread slaves, memcached-to-InnoDB? Feel free to email keith.larson[@]oracle[.]com with feedback.

If you have been busy with development, and not realized that previews of MySQL 5.6 are available, then now is your chance. Previews of MySQL 5.6 are available at http://labs.mysql.com for you to evaluate.

Firebird行ロック待ちの秒数をトランザクション単位で指定する(Firebird 2.0以降の場合)

JUGEMテーマ:コンピュータ

前回はMySQL(InnoDB行ロック待ちの秒数をセッション単位で指定する)について言及しましたが、今回は久しぶりにFirebirdで。

Firebirdは1.5までロック待ちはする、しないという区別しかありませんでしたが(デフォルトは無限にする)Firebird 2.0からLOCK TIMEOUTというオプションがトランザクション開始(SET TRANSACTION)に追加され、トランザクション毎に設定できます。(MySQLのセッション(もしくはグローバル)単位、Oracleのクエリ単位とは、また違った方法です)

…

[さらに読む]
Valcunの夢、Falconからの解放、NimbusDB改めNuoDB

JUGEMテーマ:コンピュータ

InterBaseの初期実装者であり、Firebirdのアドバイザ、そして次期Firebird Valcunの初期実装、そしてMySQLではFalconデータベースエンジンのメインエンジニアだったジム・スターキーというおっさん(じいさん?)がいるが、そのジムの新しいデータベース(いや、昔のジムの言葉を借りれば「コンテンツストア」か?)の名称がNuoDB(旧: NimbusDB改め)
となりました。

NuoDB is the new NimbusDB


Early Release …

[さらに読む]
SSD as a cheaper RAM

For RAID 10:can get 8* (Dell 1TB 7.2K SATA Hard Drive for PowerEdge R710,239$) for 8*239$=1912, which is ~1.86$ per GBFor SSD :can get 40GB card for 89$, which is ~2.2$ per GBFor memory: can get 4GB card for 33$,which is ~8.25$ per GB
















(this picture cross-post from http://www.anandtech.com/show/4244/intel-ssd-320-review)
The performance test report as following:


…

[さらに読む]
Compare MYSQL5.1 MYISAM and INNODB performance

Use the synbench to test mysql5.1 MYISAM and INNODB performance.get following result:

oltp-table-size=1000000
num-threads=16
max-requests=500

For insert:

MYISAM:

Creating table 'test_isam'...
Creating 1000000 records in table 'test_isam'...
real    0m12.516s
user    0m0.602s
sys     0m0.041s


INODB:

Creating table 'test_inno'...
Creating 1000000 records in table 'test_inno'...
real    0m16.746s
user    0m0.611s
sys     0m0.043s


For Query:













The …

[さらに読む]
InnoDB行ロック待ちの秒数をセッション単位で指定する[MySQL 5.1, MySQL 5.5の場合]

JUGEMテーマ:コンピュータ

InnoDBの行ロック待ち時間は秒単位でinnodb_lock_wait_timeoutシステム変数に指定した時間待つ仕様になっていました。(デフォルトは50秒)

ただMySQLではこの変数はグローバルでしか設定できず、一部のクエリのためだけにグローバル設定を変更するのはインパクトが大きく、特定の接続(セッション)やクエリ単位で設定できないかという機能要求があげられていました。

innodb_lock_wait_timeout is not dynamic, not per session

…

[さらに読む]