剛剛在看文件的時候看到
select 的條件若有 <> 時會吃不到Index
另外也儘量不用 not in
可以用not exists or in ( select ... from table1 minus select ... from table2)
以上可以提升效能
http://stackoverflow.com/questions/3545323/why-the-select-from-table-where-id-not-in-list-of-int-ids-query-is-slow-in
2013年2月26日 星期二
2013年2月22日 星期五
[SQL]optimal not in performance
若使用not in 的效能很差
可以改用minus可以提升效能
可以改用minus可以提升效能
http://dbaforums.org/oracle/index.php?showtopic=21583
http://www.dba-oracle.com/oracle_news/2005_3_31_tips_using_not_exists_minus_sql.htm
http://www.dba-oracle.com/t_cbo_existence_queries.htm
2013年2月18日 星期一
[JavaScrip]判斷字串是否為空白或包含某字元
判斷是否為空白字元
$('[name*=polFormatid]').val().trim() == ""
http://stackoverflow.com/questions/1151032/javascript-blank-space-validation
判斷是否包含某字元
$('[name*=polFormatid]').val().indexOf("%") != -1
http://stackoverflow.com/questions/1789945/method-like-string-contains-in-javascript http://miisoo.blogspot.tw/2008/01/javascript-string-operations.html
$('[name*=polFormatid]').val().trim() == ""
http://stackoverflow.com/questions/1151032/javascript-blank-space-validation
判斷是否包含某字元
$('[name*=polFormatid]').val().indexOf("%") != -1
http://stackoverflow.com/questions/1789945/method-like-string-contains-in-javascript http://miisoo.blogspot.tw/2008/01/javascript-string-operations.html
2013年2月14日 星期四
[SQL] new line sign
new line in plsql is CHR(13) || CHR(10)
reference:http://www.orafaq.com/forum/t/59679/2/
2013年2月4日 星期一
[SQL]ROW LOCK的發生情況
1.UPDATE的時候會造成ROW LOCK
最好在UPDATE後COMMIT
開頭也要加 PRAGMA AUTONOMOUS_TRANSACTION
2.同時INSERT時也會LOCK
參考:
http://www.dbasky.com/oracle/update_index_row_lock_waits.html
訂閱:
文章 (Atom)