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 閱讀(232) 評(píng)論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2010年3月>
          28123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910

          導(dǎo)航

          統(tǒng)計(jì)

          公告

          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)

          隨筆檔案

          文章檔案

          搜索

          積分與排名

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 临西县| 云梦县| 星座| 平阳县| 惠安县| 台中市| 霸州市| 梨树县| 利津县| 东阳市| 石景山区| 四子王旗| 体育| 朔州市| 寿阳县| 潮州市| 兴化市| 海原县| 辽源市| 濮阳市| 屏东县| 铜陵市| 焦作市| 祁东县| 健康| 教育| 同江市| 峡江县| 吉首市| 冕宁县| 宁陕县| 西宁市| 西吉县| 唐山市| 昔阳县| 雅安市| 寻乌县| 磐安县| 麟游县| 长泰县| 五台县|