看板 Database 關於我們 聯絡資訊
關於 index的使用,想到一個規則,對欄位做運算通常就不會用到 index 以下例子供參考,若有興趣可實驗看看。 select * from table where index_column=2 使用索引 select * from table where index_column+1=1 不使用索引 select * from table where index_column like'a%' 使用索引 select * from table where substring(index_column,1,1)='a' 不使用索引 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.202.143
TonyQ:不知道isNull 算不算有運算 想來測測看...:p 05/21 17:22
evernever:用MS-SQL測, 真的有差... 05/21 21:05
grence:噗…發現算數學算錯XD 05/22 00:03
vitolee:我待會也來測測看 XD 05/22 01:43
TonyQ:奇怪 , 我用 ms-sql 測試 select * from tb where id+1>50 05/22 11:30