Categories
Programming/php Software

[memo] 在 PHP 使用 ssh tunnel 連接遠端的 mysql server

 

Categories
Article or News Software

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

  From URL : http://anyall.org/blog/2009/04/performance-comparison-keyvalue-stores-for-language-model-counts/   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 […]

Categories
DATABASE JOB

some mysql tips

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

Categories
Copy_N_Paste DATABASE Programming/php Reading Software System/Linux/Unix*

Protected: [收藏好文] 網站背後技術與技巧

There is no excerpt because this is a protected post.

Categories
DATABASE System/Linux/Unix*

Protected: [轉貼] optimize query statement oracle

There is no excerpt because this is a protected post.

Categories
Copy_N_Paste DATABASE JOB

MySQL – Optimizing Database Structure

參考: http://dev.mysql.com/doc/refman/5.0/en/optimizing-database-structure.html 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 […]

Categories
DATABASE

mysql index 的建立/使用 , Multiple-Column Indexes

http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html 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 […]

Categories
DATABASE

Protected: Oracle , full-table-scans ( FTS ) 迷思? — 想看的跟我要密碼

There is no excerpt because this is a protected post.

Categories
DATABASE

Oracle , full-table-scans (FTS) problem

http://www.dba-oracle.com/t_sql_like_clause_index_usage.htm 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 […]

Categories
DATABASE

Oracle hint 用法 , database 優化 tunning

常見Oracle HINT的用法: 1. /*+ALL_ROWS*/ 表明對語句塊選擇基於開銷的優化方法,並獲得最佳吞吐量,使資源消耗最小化. 例如: SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO=’SCOTT’; 2. /*+FIRST_ROWS*/ 表明對語句塊選擇基於開銷的優化方法,並獲得最佳響應時間,使資源消耗最小化. 例如: SELECT /*+FIRST_ROWS*/ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO=’SCOTT’; 3. /*+CHOOSE*/ 表明如果數據字典中有訪問表的統計資料,將基於開銷的優化方法,並獲得最佳的吞吐量; 表明如果數據字典中沒有訪問表的統計資料,將基於規則開銷的優化方法; 例如: SELECT /*+CHOOSE*/ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO=’SCOTT’; 4. /*+RULE*/ 表明對語句塊選擇基於規則的優化方法. 例如: SELECT /*+ RULE */ EMP_NO,EMP_NAM,DAT_IN FROM BSEMPMS WHERE EMP_NO=’SCOTT’; 5. /*+FULL(TABLE)*/ 表明對表選擇全局掃描的方法. 例如: SELECT /*+FULL(A)*/ […]