key / value database’ performance compare – 查詢 對照表效能 PK 賽

  From URL :   architecture name speed (tweets/sec) in-memory, within-process python dictionary 2700 on-disk, within-process tokyo cabinet hashtable 1400 on-disk, within-process berkeleydb hashtable 340 on-disk, over socket tokyo tyrant, binary protocol 225 in-memory, over socket memcached 120 in-memory, over socket tokyo tyrant, memcached protocol 85 on-disk, over socket tokyo tyrant, memcached protocol 85 … Read more

some mysql tips

mysql 的 innodb 重裝或改了 innodb_log_file_size 後, 發現 xxx/yyy.frm 壞了 , 解決辦法是 把 /var/lib/mysql/ib_logfile* 砍了, 再 restart mysql 在 中提到…. 若要大量 bluk 作 insert 動作前, 下 ALTER TABLE tbl_name DISABLE KEYS , 這樣可以讓 insert 加快, 但是作完 insert 後還是得 enable keys , 把 missing 的 indexs 補回來, 我想這時也是非常耗時間吧!! 另外 enable / disable keys 對於 mysql 5.1.1 … Read more

MySQL – Optimizing Database Structure

參考: 7.4.1. Make Your Data as Small as Possible 7.4.2. Column Indexes 7.4.3. Multiple-Column Indexes 7.4.4. How MySQL Uses Indexes 7.4.5. The MyISAM Key Cache 7.4.6. MyISAM Index Statistics Collection 7.4.7. How MySQL Opens and Closes Tables 7.4.8. Disadvantages of Creating Many Tables in the Same Database 減少 record structure 的大小 – Numeric Types … Read more

mysql index 的建立/使用 , Multiple-Column Indexes CREATE TABLE test ( id INT NOT NULL, last_name CHAR(30) NOT NULL, first_name CHAR(30) NOT NULL, PRIMARY KEY (id), INDEX name (last_name,first_name) ); The name index is an index over the last_name and first_name columns. The index can be used for queries that specify values in a known range for last_name, or for both … Read more

Oracle , full-table-scans (FTS) problem Indexing when using the SQL "like" clause can be tricky because the wildcard "%" operator can invalidate the index.  For example a last_name index would be OK with a "like ‘SMI%’" query, but unusable with "like ‘%SMI%’. Solutions to this issue of a leading wildcard can be addressed in several ways:: Oracle text indexes … Read more