posts - 25, comments - 69, trackbacks - 0, articles - 2
          同樣的一條語句,一條是在pl/sql里面組裝成sql之后提交執行,另外一條是用pro*c程序后綁定執行,沒想到執行策略和效率天差地別。看來做什么事都不能想當然,要細心學習才行。保留此條語句以做紀念:

          select *
          ? from (select /*+ INDEX(A IDX_HISBUFAREJOUR_ACCOUNT) +*/
          ???????? a.*, f.sort_name
          ????????? from hs_his.hisbufarejour a, hs_fund.faresort f
          ???????? where (((((((a.fare_sort = f.fare_sort and a.client_id = :b0) and
          ?????????????? (:b1 = 0 or a.fund_account = :b2)) and
          ?????????????? a.init_date >= :b3) and a.init_date <= :b4) and
          ?????????????? (trim(:b5) is null or
          ?????????????? instr(((',' || :b6) || ','),
          ???????????????????????? ((',' || a.exchange_type) || ',')) > 0)) and
          ?????????????? (trim(:b7) is null or
          ?????????????? instr(((',' || :b8) || ','),
          ??????????????????????? ((',' || a.money_type) || ',')) > 0)) and
          ?????????????? (trim(:b9) is null or a.position_str > :b10))
          ???????? order by a.position_str)
          ?where rownum <= :b11


          ??????
          b0:130330000516
          b1:595995
          b2:595995
          b3:20061221
          b4:20061221
          b5:1
          b6:1
          b7:2
          b8:2
          b9:
          b10:
          b11:30

          Feedback

          # re: 郁悶的問題:oracle pl/sql 和 pro c中的執行策略  回復  更多評論   

          2006-12-22 21:47 by proc
          還有人在用proc這么古老的東西,又是日本項目吧
          主站蜘蛛池模板: 达尔| 山丹县| 紫阳县| 鲁甸县| 花莲市| 河北区| 富锦市| 宝应县| 涿鹿县| 双柏县| 清镇市| 绩溪县| 攀枝花市| 垦利县| 临泉县| 曲阳县| 肇庆市| 台东县| 胶州市| 历史| 卢氏县| 正安县| 永登县| 喀喇沁旗| 兰考县| 射洪县| 腾冲县| 广南县| 聂拉木县| 教育| 阳原县| 克什克腾旗| 昭通市| 吴堡县| 红河县| 资中县| 浠水县| 长兴县| 循化| 鄄城县| 谷城县|