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)

          隨筆檔案

          文章檔案

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 泸西县| 长春市| 灵川县| 五华县| 阳曲县| 万州区| 喀喇沁旗| 汶川县| 昌都县| 桐庐县| 正安县| 河池市| 仙桃市| 舞钢市| 远安县| 海阳市| 内黄县| 佳木斯市| 交口县| 大连市| 昌都县| 定陶县| 台南市| 延长县| 泰州市| 宝坻区| 南康市| 黄龙县| 西丰县| 湘潭市| 乌拉特后旗| 甘肃省| 苏尼特右旗| 靖西县| 丰台区| 瓦房店市| 建昌县| 伊春市| 安达市| 苏尼特右旗| 弋阳县|