到訪次數 | 1099047 |
訂閱次數 | 1 |
文章總數 | 1476 |
今日文章 | 0 |
回應總數 | 4 |
今日回應 | 0 |
所謂死結(Dead-lock),就是當二個或多個異動(transaction)鎖定同一資料,而且每個異動都在等待其他異動解除資源鎖定,陷入循環等待。
一、第一支transactino執行時,會先update UD1,10秒後再update UD2。
set transaction isolation level read uncommitted
begin tran
update dbo.UD1 set cID=3 where cName='aaa'
waitfor delay '00:00:10'
update dbo.UD2
步驟一:修改/etc/sysctl.conf參數
#oracle
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
步驟二:修改/etc/security/limit
以jsp解決資料庫編碼問題,之前前後端的編碼都採用utf-8,而jsp是採用big5但對於裏功銹等字還是無法解決,所以使用ms950(微軟制定,與大部份big5相容,Windows預設編碼)來解決編碼問題。因圖片上傳功能故障,所以相關圖片稍後上傳。
以下新增、查詢測試均以10000筆資料及10000次進行三次測試,取平均值。
無索引 |
|||
|
Memory |
InnoDB |
innodb |
Insert |
2,047 |
284,192 |
2,520 |
= |
22,458 |
46,620 |
23,609 |
>= |
126,359 |
158,453 |
127,047 |
Like %Str% |
20,635 |
46,651 |
23,020 |
Like Str% |
20,031 |
46,521 |
22,526 |
單位:Millisecond
結論:在無索引的測試中,測試速度皆是Memory > innodb > InnoDB。
BTree |
|||
|
Memory |
InnoDB |
innodb |
Insert |
2, |
SQL92 |
Oracle |
MySQL |
型態說明 |
||
數值型態 |
|||||
DECIMAL |
DECIMAL |
DECIMAL |
具有固定有效位數和小數位數的數值資料類型。 |
||
NUMERIC |
NUMERIC |
-- |
可選精度的準確數字 |
||
FLOAT |
FLOAT |
FLOAT |
用於表示浮點數值數據的大致數值數據類型。 1.79E + 308 至 -2.23E - 308、0 以及 2.23E - 308 至 1.79E + 308 |
||
INTEGER |
INTEGER |
INTEGER |
整數型態 |
||
INTERVAL |
-- |
-- |
時間間隔,二種類型: 1. ”年-月&rdqu |