[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
basedir="c:/program files/mysql/mysql server 5.5/"
character-set-server=utf8
default-storage-engine=innodb
sql-mode="strict_trans_tables,no_auto_create_user,no_engine_substitution"
max_connections=1024
query_cache_size=512
table_cache=512
tmp_table_size=512m
thread_cache_size=128
myisam_max_sort_file_size=100g
myisam_sort_buffer_size=512m
key_buffer_size=512m
read_buffer_size=512k
read_rnd_buffer_size=512k
sort_buffer_size=512k
innodb_additional_mem_pool_size=512m
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=4096k
innodb_buffer_pool_size=512m
# do not modify log value , server can not start
innodb_log_file_size=170m
innodb_thread_concurrency=16
#-----------------log-------------
#all logs
log="d:/logs/mysql/mylog.log"
#error log
log-warnings=1
log_output=file
log-error="d:/logs/mysql/error.log"
#query log
slow_query_log=1
long_query_time=2
slow_query_log_file="d:/logs/mysql/slowquery.log"
#log-slow-queries="d:/logs/mysql/slowquery.log"
#recoerd queries that without index
log-queries-not-using-indexes="d:/logs/mysql/nouseindex.log"
高效能mysql 樹 高效能mysql精要
1 explain 中 extra using index 表示覆蓋索引,sql優化中最好能使用覆蓋索引,否則 二級索引 需要回表查詢。所謂覆蓋索引,是指要查詢的列正好是索引,而條件也是這個索引之一 2 where 語句中 條件等於主鍵的 在核心索引層完成,條件等於非索引的,在服務層完成 3 讀索引...
mysql高效能索引 mysql高效能索引( )
在開發中,我們知道大多數應用的瓶頸在於sql語句的執行時耗,在這裡並不討論sql語句的安全,僅僅討論高效能sql語句,而與高效能sql語句緊密相連的就是傳說中的 索引。索引 一種工作在儲存引擎端的用於快速找到記錄的一種資料結構。mysql使用索引的方式是 先找到索引的值,再根據索引的值找到資料行。索...
高效能mysql(一) 建立高效能索引
單列索引和多列索引 單列索引 多個單列索引的選擇問題 多個or條件 多個單列的效能往往效能很低,盡量建立高效的多列索引。多列索引 選擇合適的索引順序 避免範圍條件 在where子句中,in是有效的,範圍條件會導致後面的索引無效!在order by中,範圍條件和in都會導致無法按照索引排序!按照索引順...