Oracle Tips One

          1. Do use oracle "Bind variable", it can increase the speed by 90 percent in 10g release1.

          2. Understand how to use "lock", read never block write,  vice verse.

          3. There is a side effect from oracle regarding to the "lock", if you do want to control the access to one row at a specify time (like doing an if 'this row belong to some search condition' then 'modify this row' action), you have to write some logic yourself, for example use the "for update" statement, like: "select * from x where x.id = 1 for update", so that you can lock the row only with id equals to '1' and then modify this row, so that some orther concurrence requests should execute the same sql first, yes, with the same 'for update' statement, and because you already have locked this row(id = 1), orther requests cannot get the access to it, and you get the access control to this row.

          4. Regardint to item 3, it will not decrease the concurrence level, because first you only lock the item with id equals to 1 and there maybe thousands of items in your table, second, it will not block the read request.

          posted on 2010-03-06 21:25 Find it, try it, experience it 閱讀(235) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2010年3月>
          28123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910

          導航

          統計

          公告

          If there is any question you have, please don't hesitate, let me know ASAP, you can find me at kenees@gmail.com or QQ: 9808873, hope to make friends with you ;)

          常用鏈接

          留言簿(1)

          隨筆檔案

          文章檔案

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 西和县| 五指山市| 司法| 江北区| 和林格尔县| 衡南县| 万荣县| 麟游县| 达日县| 齐齐哈尔市| 福安市| 阳新县| 贵州省| 胶州市| 垦利县| 北安市| 任丘市| 广灵县| 德阳市| 民权县| 林甸县| 元氏县| 合水县| 凭祥市| 老河口市| 盘锦市| 拜城县| 盐城市| 镇安县| 桓台县| 长宁县| 新闻| 沾化县| 宜良县| 无极县| 通化市| 泰兴市| 青浦区| 讷河市| 舒城县| 铜陵市|