SlideShare a Scribd company logo
1 of 28
Download to read offline
Oracle Unconference

                                 シンプル・イズ・ベスト
                                 シンプル イズ ベスト
                               ~デフォルト機能を使い倒せ!~
                                デフォルト機能を使い倒せ!




                                                     株式会社 コーソル   1
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     2
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     3
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅰ.松下雅@コーソルって誰?
           株式会社コーソル所属の技術屋
                    Oracle Supportとインフラが強み
                    Oracle Master所有率 96%
                    社員79名(2009/1/20現在)

           色々やらせていただいてます
                    @ITへの寄稿
                    書籍執筆
                       執


                                                     4
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     5
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう

        ここで言いたいことは
        ここで言いたいことは・・・

                                                     さん       しょう
                                        ち                 ち

                                 地産地消
        ※ 地域生産地域消費(ちいきせいさん・ちいきしょうひ)
          の略語。地域で生産された農産物や水産物をその地域
          で消費すること。by Wikipedia

                                                                    6
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
           極々一般的な構成




                   DB Serv.                          AP Serv.
                                                                User
                                                                Use
      データを貯めて                                        アプリを実行
       おくサ
       おくサーバ                                         するサ
                                                     するサーバ
                                                                       7
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
           この構成のリソースは・・・?


            DB S
               Serv.                                           AP S
                                                                  Serv.
                                                     Network




                                                                          8
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
           100万件のテーブルから10件を検索する場合
                    仮に、AP Serv.でレコードを絞ろうとしたら・・・?

                                    DB Serv.-AP Serv.間に、
                                    100万件のデータが流れる




                              DB Serv.               AP Serv.
                                                                9
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
           100万件のテーブルから10件を検索する場合
                    では、DB Serv.でレコードを絞ったら・・・?

                                            DB Serv.-AP Serv.間に
                                            10件のデ タが流れる
                                            10件のデータが流れる




                              DB Serv.                      AP Serv.
                                                                       10
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
           これは、SQLの ≪選択≫≪射影≫≪結合≫
           全てにあてはまります。

         ≪選択≫ → 抽出条件は適切ですか?
                                            句、      句
                                       WHERE句、HAVING句
         ≪射影≫ → 必要なカラムに絞ったSQLですか?
                                       SELECT * → AP S    で絞 ていませんか?
                                                     Serv.で絞っていませんか?
         ≪結合≫ → 発行している複数のSQL文、
                                       まとめることはできませんか?


                                                                       11
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅱ. システムの構成を考えよう
                         アプリケーションを実行するサーバは AP Serv.
                         に間違いありません。が、そこで使用(表示)す
                         に間違いありません が そこで使用(表示)す
                         るデータの抽出は、DB Serv. で絞りこむと大分
                         エコになります。




                              DB Serv.               AP Serv.
                                                                12
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     13
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを

        ここで言いたいことは
        ここで言いたいことは・・・

                                                     こ       しん
                                      おん                 ち

                                 温故知新
        ※ 故きを温ねて新しきを知れば、以って師と為るべし。
          by 語源由来辞典


                                                                  14
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを



                   cat <ファイル名> | sort | uniq
                                           q

                          イル名
                   cat <ファイル名> | sort -u

                   sort -u <ファイル名>

                                                     15
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  パイプ、コマンドの動き


                 cat <ファイル名> |                       sort -u
                                                           u


                               プロセスA                  プロセスB


                                    プロセスAとプロセスBは並行稼動

                                                               16
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを



           find . -maxdepth 1 -mtime +200 –exec rm {} ¥;
                   maxdepth mtime          exec


           find . -maxdepth 1 -mtime +200 | xargs rm


           find . -maxdepth 1 -mtime +200 –exec rm {} +


                                                          17
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  find -exec、xargsの動き

                                                     見つけたファイルに対し、1行ずつ
                 find -exec ¥;                       実行。複数回、同一のコマンドが実
                                                     実行 複数回 同一のコマンドが実
                                                     行される。

                                                     rm
                                                      rm
                                                       rm
                                                        rm
                                                         rm
                                                           rm
                                                            rm
                                                              rm
                                                               rm
                                                                    18
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  find -exec、xargsの動き

                                                     標準入力で渡されたリテラルを、
                 xargs
                                                     引数の限界(ARG_MAX)まで1つの
                                                     引数の限界(ARG MAX)まで1つの
                 find -exec +
                                                     オプションとして実行。同一のコマンド
                                                     が、まとめて実行される。

                                                     rm


                                                     rm


                                                                     19
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
               補足
         『find -exec +』 は、語尾が 『{} +』 で終わる必要があります。
         (『ls』 や 『rm』 では使えるが、『mv』 や 『cp』 では使えない)
                ○ find . -maxdepth 1 -mtime +200 -exec rm {} +
                × find . -maxdepth 1 -mtime +200 -exec mv {} backup +
                               p                                  p



         この先は、各コマンド(環境)依存です。※汎用的には厳しい。
         (『mv』 や 『cp』 では、--target-directoryでクリア)
       ○ find . -maxdepth 1 -mtime +200 –exec mv --target-directory=backup {} +
                 maxdepth mtime          exec      target directory backup
       ※BSD           find . -maxdepth 1 -mtime +200 | xargs -J mv {} backup


                                                                               20
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
    set timing on
    declare
        cursor c1 i select id,age from tbl_daityo;
                  is l t id       f    tbl d it
                                                                     update tbl_daityo set kouza=kouza + 20000
        r1 tbl_daityo%rowtype;
                                                                                where age > 64 or age < 19;
    begin
      g
                                                                     update tbl_daityo set kouza=kouza + 12000
        for r1 in c1 loop
                                                                                where age > 18 and age < 65;
          if r1.age > 64 or r1.age < 19 then
            update tbl_daityo set kouza = kouza + 20000
            where id = r1.id;
          else
            update tbl_daityo set kouza = kouza + 12000
            where id = r1.id;
          end if
              if;
                                                     update tbl_daityo
        end loop;
                                                      set kouza=(case when age > 64 or age < 19 then kouza + 20000
        commit;
                                                                         else kouza + 12000
    end;                                                         end);                                         21
    /
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  PL/SQLエンジン、SQLエンジン
  declare
    cursor c1 is select id,age from tbl_daityo;
    r1 tbl_daityo%rowtype;
                                                                           SQL
  begin

                                                                          エンジン
    f
    for r1 in c1 loop
                    p
       if r1.age > 64 or r1.age < 19 then
          update tbl_daityo set kouza = kouza + 20000 where id = r1.id;
       else
        ls
                                                                          PL/SQL
          update tbl_daityo set kouza = kouza + 12000 where id = r1.id;
                                                                          エンジン
       end if;
    end loop;
    commit;
  end;

                                                                              22
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  チューニング案件でよく聞く言葉
                   「SQL を見せてください」
                   「インデックスは有効ですか?」
                   「実行計画に問題はないですか?」
                   「アナライズは最新ですか?」
                   declare
                     cursor c1 is select id,age from tbl_daityo;
                     r1 tbl_daityo%rowtype;
                   begin
                     for r1 in c1 loop
                       if r1.age > 64 or r1.age < 19 then
                                                                                           これ
                           update tbl daityo set kouza = kouza + 20000 where id = r1 id;
                                  tbl_daityo                                      r1.id;
                       else
                           update tbl_daityo set kouza = kouza + 12000 where id = r1.id;
                       end if;
                     end loop;
                     commit;
                                                                                                23
                   end;
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅲ. 極力、シンプルなコードを
                  是非、これも聞いて欲しい
                  「SQL は、どこからKickされますか?」
                  「トランザクション・フローを教えてください」
                  「トランザクション・フロ を教えてください」
                  「詳細設計書見せてください」                       ※ やりすぎか・・・


                                                     ※ 8.1.6 以降 SQL-92
                                                                SQL 92
                        CASE
                                                     ※ 9i 以降
                        MERGE                                  SQL:2003
                                                     ※ 9i 以降       l 独自
                        Multi Table Insert
                          l i bl                        i      Oracle独自
                  ※ Bugにだけ、ご注意ください。。。
                      g
                                                                          24
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     25
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅳ. デフォルトの設定って?




         インスタンス → memory_target ※11g 以降
                                      降
                                                                  ※10g 以降
                                                     sga_target
                                                     sga target
         データベース → AUTOEXTEND




                                                                       26
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Oracle Unconference


                   Ⅰ. 松下雅@コーソルって誰?
                   Ⅱ. システムの構成を考えよう
                   Ⅲ. 極力、シンプルなコードを
                   Ⅲ 極力 シンプルな   ドを
                   Ⅳ.
                   Ⅳ デフォルトの設定って?
                   Ⅴ. Question & Answer
                    .


                                                     27
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
Ⅴ 全体を通して




                                Question
                                                     &

                                      Answer
                                                         28
Copyright (C) 2009 CO-Sol Inc. All Rights Reserved

More Related Content

What's hot

ミクシィ決算説明資料 FY2008 2Q
ミクシィ決算説明資料 FY2008 2Qミクシィ決算説明資料 FY2008 2Q
ミクシィ決算説明資料 FY2008 2QMaki Fujita
 
20070920173805
2007092017380520070920173805
200709201738055045033
 
Sciencecafe Niigata(20090913)
Sciencecafe Niigata(20090913)Sciencecafe Niigata(20090913)
Sciencecafe Niigata(20090913)真 岡本
 
Windows 7兼容性系列课程(5):Windows 7徽标认证
Windows 7兼容性系列课程(5):Windows 7徽标认证Windows 7兼容性系列课程(5):Windows 7徽标认证
Windows 7兼容性系列课程(5):Windows 7徽标认证Chui-Wen Chiu
 
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信Yusuke Kawasaki
 
IPV9人类共同的理想/IPv9 - The common ideal for human being
IPV9人类共同的理想/IPv9 - The common ideal for human beingIPV9人类共同的理想/IPv9 - The common ideal for human being
IPV9人类共同的理想/IPv9 - The common ideal for human beingshizhao
 
【13-C-7】 Developers [Media] Summit InfoQ のコンセプト
【13-C-7】 Developers [Media] Summit InfoQ のコンセプト【13-C-7】 Developers [Media] Summit InfoQ のコンセプト
【13-C-7】 Developers [Media] Summit InfoQ のコンセプトdevsumi2009
 
Metadaily80131
Metadaily80131Metadaily80131
Metadaily80131arefnet
 
僕らのかんばん方式 -Our Kanban Board-
僕らのかんばん方式 -Our Kanban Board-僕らのかんばん方式 -Our Kanban Board-
僕らのかんばん方式 -Our Kanban Board-Fumihiko Kinoshita
 
テキストマイニングとNLPビジネス
テキストマイニングとNLPビジネステキストマイニングとNLPビジネス
テキストマイニングとNLPビジネスHiroshi Ono
 
Table 13
Table 13Table 13
Table 13HITEMY
 
Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Chui-Wen Chiu
 
Запретный маркетинг
Запретный маркетингЗапретный маркетинг
Запретный маркетингYana Grechanenko
 
すくすくスクラム
すくすくスクラムすくすくスクラム
すくすくスクラムAkihito Enomoto
 
Table 15
Table 15Table 15
Table 15HITEMY
 
アジャイル事例紹介 —夜のおしごと編—
アジャイル事例紹介 —夜のおしごと編—アジャイル事例紹介 —夜のおしごと編—
アジャイル事例紹介 —夜のおしごと編—Fumihiko Kinoshita
 
QM-076-六標準差管理方法的解題邏輯與策略
QM-076-六標準差管理方法的解題邏輯與策略QM-076-六標準差管理方法的解題邏輯與策略
QM-076-六標準差管理方法的解題邏輯與策略handbook
 
Hd60 Gd9 Manual
Hd60 Gd9 ManualHd60 Gd9 Manual
Hd60 Gd9 Manualguest807a1
 

What's hot (20)

ミクシィ決算説明資料 FY2008 2Q
ミクシィ決算説明資料 FY2008 2Qミクシィ決算説明資料 FY2008 2Q
ミクシィ決算説明資料 FY2008 2Q
 
20070920173805
2007092017380520070920173805
20070920173805
 
S30
S30S30
S30
 
Sciencecafe Niigata(20090913)
Sciencecafe Niigata(20090913)Sciencecafe Niigata(20090913)
Sciencecafe Niigata(20090913)
 
Windows 7兼容性系列课程(5):Windows 7徽标认证
Windows 7兼容性系列课程(5):Windows 7徽标认证Windows 7兼容性系列课程(5):Windows 7徽标认证
Windows 7兼容性系列课程(5):Windows 7徽标认证
 
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
Cloud era -『クラウド時代』マッシュアップ技術による地方からの世界発信
 
It Flyer Page08
It Flyer Page08It Flyer Page08
It Flyer Page08
 
IPV9人类共同的理想/IPv9 - The common ideal for human being
IPV9人类共同的理想/IPv9 - The common ideal for human beingIPV9人类共同的理想/IPv9 - The common ideal for human being
IPV9人类共同的理想/IPv9 - The common ideal for human being
 
【13-C-7】 Developers [Media] Summit InfoQ のコンセプト
【13-C-7】 Developers [Media] Summit InfoQ のコンセプト【13-C-7】 Developers [Media] Summit InfoQ のコンセプト
【13-C-7】 Developers [Media] Summit InfoQ のコンセプト
 
Metadaily80131
Metadaily80131Metadaily80131
Metadaily80131
 
僕らのかんばん方式 -Our Kanban Board-
僕らのかんばん方式 -Our Kanban Board-僕らのかんばん方式 -Our Kanban Board-
僕らのかんばん方式 -Our Kanban Board-
 
テキストマイニングとNLPビジネス
テキストマイニングとNLPビジネステキストマイニングとNLPビジネス
テキストマイニングとNLPビジネス
 
Table 13
Table 13Table 13
Table 13
 
Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述Windows 7兼容性系列课程(1):Windows 7兼容性概述
Windows 7兼容性系列课程(1):Windows 7兼容性概述
 
Запретный маркетинг
Запретный маркетингЗапретный маркетинг
Запретный маркетинг
 
すくすくスクラム
すくすくスクラムすくすくスクラム
すくすくスクラム
 
Table 15
Table 15Table 15
Table 15
 
アジャイル事例紹介 —夜のおしごと編—
アジャイル事例紹介 —夜のおしごと編—アジャイル事例紹介 —夜のおしごと編—
アジャイル事例紹介 —夜のおしごと編—
 
QM-076-六標準差管理方法的解題邏輯與策略
QM-076-六標準差管理方法的解題邏輯與策略QM-076-六標準差管理方法的解題邏輯與策略
QM-076-六標準差管理方法的解題邏輯與策略
 
Hd60 Gd9 Manual
Hd60 Gd9 ManualHd60 Gd9 Manual
Hd60 Gd9 Manual
 

Viewers also liked

Programacion tecnicas estudio 09 10
Programacion tecnicas estudio 09 10Programacion tecnicas estudio 09 10
Programacion tecnicas estudio 09 10guestb264d8
 
Manual de ativaã§ã£o speed 80509-d01 a-001
Manual de ativaã§ã£o speed   80509-d01 a-001Manual de ativaã§ã£o speed   80509-d01 a-001
Manual de ativaã§ã£o speed 80509-d01 a-001nielson araujo
 
Saiba como cuidar_de_seus_cabelos_no_verão
Saiba como cuidar_de_seus_cabelos_no_verãoSaiba como cuidar_de_seus_cabelos_no_verão
Saiba como cuidar_de_seus_cabelos_no_verãoPortalCocal
 
Ea Design Multimedia
Ea Design MultimediaEa Design Multimedia
Ea Design Multimediaeadesign
 
Conteúdo para ensino online fotografia
Conteúdo para ensino online   fotografiaConteúdo para ensino online   fotografia
Conteúdo para ensino online fotografiaFabiana Braga
 
Apresentação sobre educação financeira e a relação com o seguro
Apresentação sobre educação financeira e a relação com o seguroApresentação sobre educação financeira e a relação com o seguro
Apresentação sobre educação financeira e a relação com o segurooficinadotexto
 
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.karlogra
 
Gabriela alejandra mora mora
Gabriela alejandra mora moraGabriela alejandra mora mora
Gabriela alejandra mora mora30GABRIELA19990
 
Historia da internet e o avanço dos computadores
Historia da internet e o avanço dos computadoresHistoria da internet e o avanço dos computadores
Historia da internet e o avanço dos computadoresrafaelacambraia09
 
Proyecto curricular pcpip 2008 09
Proyecto curricular pcpip 2008  09Proyecto curricular pcpip 2008  09
Proyecto curricular pcpip 2008 09guestb264d8
 
Clippings SBU - De Volta ao Controle
Clippings SBU - De Volta ao ControleClippings SBU - De Volta ao Controle
Clippings SBU - De Volta ao ControleKetchumD
 

Viewers also liked (20)

Programacion tecnicas estudio 09 10
Programacion tecnicas estudio 09 10Programacion tecnicas estudio 09 10
Programacion tecnicas estudio 09 10
 
Trabalho 2
Trabalho 2Trabalho 2
Trabalho 2
 
Pcpi ab
Pcpi abPcpi ab
Pcpi ab
 
Manual de ativaã§ã£o speed 80509-d01 a-001
Manual de ativaã§ã£o speed   80509-d01 a-001Manual de ativaã§ã£o speed   80509-d01 a-001
Manual de ativaã§ã£o speed 80509-d01 a-001
 
Saiba como cuidar_de_seus_cabelos_no_verão
Saiba como cuidar_de_seus_cabelos_no_verãoSaiba como cuidar_de_seus_cabelos_no_verão
Saiba como cuidar_de_seus_cabelos_no_verão
 
Ea Design Multimedia
Ea Design MultimediaEa Design Multimedia
Ea Design Multimedia
 
Conteúdo para ensino online fotografia
Conteúdo para ensino online   fotografiaConteúdo para ensino online   fotografia
Conteúdo para ensino online fotografia
 
Quando ...
Quando ...Quando ...
Quando ...
 
Unidad III Tema 1
Unidad III Tema 1Unidad III Tema 1
Unidad III Tema 1
 
Portifólio 2014 (fd)
Portifólio 2014 (fd)Portifólio 2014 (fd)
Portifólio 2014 (fd)
 
Apresentação sobre educação financeira e a relação com o seguro
Apresentação sobre educação financeira e a relação com o seguroApresentação sobre educação financeira e a relação com o seguro
Apresentação sobre educação financeira e a relação com o seguro
 
Cnhsas
CnhsasCnhsas
Cnhsas
 
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.
Los sentimientos a flor de piel. Conoce el vocabulario de los sentimientos.
 
Gabriela alejandra mora mora
Gabriela alejandra mora moraGabriela alejandra mora mora
Gabriela alejandra mora mora
 
Historia da internet e o avanço dos computadores
Historia da internet e o avanço dos computadoresHistoria da internet e o avanço dos computadores
Historia da internet e o avanço dos computadores
 
Proyecto curricular pcpip 2008 09
Proyecto curricular pcpip 2008  09Proyecto curricular pcpip 2008  09
Proyecto curricular pcpip 2008 09
 
Clippings SBU - De Volta ao Controle
Clippings SBU - De Volta ao ControleClippings SBU - De Volta ao Controle
Clippings SBU - De Volta ao Controle
 
Cnh1_5
Cnh1_5Cnh1_5
Cnh1_5
 
Quantum
QuantumQuantum
Quantum
 
Laerning05
Laerning05Laerning05
Laerning05
 

Similar to Oracle Unconference 松下 4/22

CSS Nite In Ginza, Vol.36
CSS Nite In Ginza, Vol.36CSS Nite In Ginza, Vol.36
CSS Nite In Ginza, Vol.36Nobuya Sato
 
Kintone 導入サービス キャンペーン_20140903-1
Kintone 導入サービス キャンペーン_20140903-1Kintone 導入サービス キャンペーン_20140903-1
Kintone 導入サービス キャンペーン_20140903-1denet_tech_tokyo
 
Sc2009autumn 次世代Daoフレームワーク Doma
Sc2009autumn 次世代Daoフレームワーク DomaSc2009autumn 次世代Daoフレームワーク Doma
Sc2009autumn 次世代Daoフレームワーク DomaToshihiro Nakamura
 
081210 Idcon 04 Itoh Peopleservice
081210 Idcon 04 Itoh Peopleservice081210 Idcon 04 Itoh Peopleservice
081210 Idcon 04 Itoh PeopleserviceHiroki Itoh
 
080718 Liberty Alliance Technical Seminar
080718 Liberty Alliance Technical Seminar080718 Liberty Alliance Technical Seminar
080718 Liberty Alliance Technical SeminarHiroki Itoh
 
20090522 Candycane
20090522 Candycane20090522 Candycane
20090522 CandycaneYusuke Ando
 
Search Engines Chapter 1 Summary
Search Engines Chapter 1 SummarySearch Engines Chapter 1 Summary
Search Engines Chapter 1 Summarysleepy_yoshi
 
Practical Bug Reporting
Practical Bug ReportingPractical Bug Reporting
Practical Bug Reportingcharsbar
 
20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説mochiko AsTech
 
090309seminar talk about Cloud Computing
090309seminar talk about Cloud Computing090309seminar talk about Cloud Computing
090309seminar talk about Cloud ComputingKohei Nishikawa
 
【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能devsumi2009
 
マッシュアップ×エンタープライズ開発 (XDev 2008)
マッシュアップ×エンタープライズ開発 (XDev 2008)マッシュアップ×エンタープライズ開発 (XDev 2008)
マッシュアップ×エンタープライズ開発 (XDev 2008)Yusuke Kawasaki
 
普通の見積り勉強会 番外編
普通の見積り勉強会 番外編普通の見積り勉強会 番外編
普通の見積り勉強会 番外編Fumihiko Kinoshita
 

Similar to Oracle Unconference 松下 4/22 (20)

CSS Nite In Ginza, Vol.36
CSS Nite In Ginza, Vol.36CSS Nite In Ginza, Vol.36
CSS Nite In Ginza, Vol.36
 
Kintone 導入サービス キャンペーン_20140903-1
Kintone 導入サービス キャンペーン_20140903-1Kintone 導入サービス キャンペーン_20140903-1
Kintone 導入サービス キャンペーン_20140903-1
 
Sc2009autumn 次世代Daoフレームワーク Doma
Sc2009autumn 次世代Daoフレームワーク DomaSc2009autumn 次世代Daoフレームワーク Doma
Sc2009autumn 次世代Daoフレームワーク Doma
 
081210 Idcon 04 Itoh Peopleservice
081210 Idcon 04 Itoh Peopleservice081210 Idcon 04 Itoh Peopleservice
081210 Idcon 04 Itoh Peopleservice
 
sigfpai73-kaji
sigfpai73-kajisigfpai73-kaji
sigfpai73-kaji
 
080718 Liberty Alliance Technical Seminar
080718 Liberty Alliance Technical Seminar080718 Liberty Alliance Technical Seminar
080718 Liberty Alliance Technical Seminar
 
20090522 Candycane
20090522 Candycane20090522 Candycane
20090522 Candycane
 
Search Engines Chapter 1 Summary
Search Engines Chapter 1 SummarySearch Engines Chapter 1 Summary
Search Engines Chapter 1 Summary
 
Practical Bug Reporting
Practical Bug ReportingPractical Bug Reporting
Practical Bug Reporting
 
20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説20090418 イケテルRails勉強会 第2部Air編 解説
20090418 イケテルRails勉強会 第2部Air編 解説
 
Practices of an Agile Team
Practices of an Agile TeamPractices of an Agile Team
Practices of an Agile Team
 
20210119 OCIJP#14 オラクル大橋資料
20210119 OCIJP#14 オラクル大橋資料20210119 OCIJP#14 オラクル大橋資料
20210119 OCIJP#14 オラクル大橋資料
 
090309seminar talk about Cloud Computing
090309seminar talk about Cloud Computing090309seminar talk about Cloud Computing
090309seminar talk about Cloud Computing
 
PHP超入門@LL温泉
PHP超入門@LL温泉PHP超入門@LL温泉
PHP超入門@LL温泉
 
【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能【12-B-4】 並列処理開発を支援するコンパイラの機能
【12-B-4】 並列処理開発を支援するコンパイラの機能
 
Ltdd For Xp2008 検閲版
Ltdd For Xp2008 検閲版Ltdd For Xp2008 検閲版
Ltdd For Xp2008 検閲版
 
03 Getting Started
03 Getting Started03 Getting Started
03 Getting Started
 
Green IT
Green ITGreen IT
Green IT
 
マッシュアップ×エンタープライズ開発 (XDev 2008)
マッシュアップ×エンタープライズ開発 (XDev 2008)マッシュアップ×エンタープライズ開発 (XDev 2008)
マッシュアップ×エンタープライズ開発 (XDev 2008)
 
普通の見積り勉強会 番外編
普通の見積り勉強会 番外編普通の見積り勉強会 番外編
普通の見積り勉強会 番外編
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Oracle Unconference 松下 4/22

  • 1. Oracle Unconference シンプル・イズ・ベスト シンプル イズ ベスト ~デフォルト機能を使い倒せ!~ デフォルト機能を使い倒せ! 株式会社 コーソル 1 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 2. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 2 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 3. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 3 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 4. Ⅰ.松下雅@コーソルって誰? 株式会社コーソル所属の技術屋 Oracle Supportとインフラが強み Oracle Master所有率 96% 社員79名(2009/1/20現在) 色々やらせていただいてます @ITへの寄稿 書籍執筆 執 4 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 5. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 5 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 6. Ⅱ. システムの構成を考えよう ここで言いたいことは ここで言いたいことは・・・ さん しょう ち ち 地産地消 ※ 地域生産地域消費(ちいきせいさん・ちいきしょうひ) の略語。地域で生産された農産物や水産物をその地域 で消費すること。by Wikipedia 6 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 7. Ⅱ. システムの構成を考えよう 極々一般的な構成 DB Serv. AP Serv. User Use データを貯めて アプリを実行 おくサ おくサーバ するサ するサーバ 7 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 8. Ⅱ. システムの構成を考えよう この構成のリソースは・・・? DB S Serv. AP S Serv. Network 8 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 9. Ⅱ. システムの構成を考えよう 100万件のテーブルから10件を検索する場合 仮に、AP Serv.でレコードを絞ろうとしたら・・・? DB Serv.-AP Serv.間に、 100万件のデータが流れる DB Serv. AP Serv. 9 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 10. Ⅱ. システムの構成を考えよう 100万件のテーブルから10件を検索する場合 では、DB Serv.でレコードを絞ったら・・・? DB Serv.-AP Serv.間に 10件のデ タが流れる 10件のデータが流れる DB Serv. AP Serv. 10 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 11. Ⅱ. システムの構成を考えよう これは、SQLの ≪選択≫≪射影≫≪結合≫ 全てにあてはまります。 ≪選択≫ → 抽出条件は適切ですか? 句、 句 WHERE句、HAVING句 ≪射影≫ → 必要なカラムに絞ったSQLですか? SELECT * → AP S で絞 ていませんか? Serv.で絞っていませんか? ≪結合≫ → 発行している複数のSQL文、 まとめることはできませんか? 11 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 12. Ⅱ. システムの構成を考えよう アプリケーションを実行するサーバは AP Serv. に間違いありません。が、そこで使用(表示)す に間違いありません が そこで使用(表示)す るデータの抽出は、DB Serv. で絞りこむと大分 エコになります。 DB Serv. AP Serv. 12 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 13. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 13 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 14. Ⅲ. 極力、シンプルなコードを ここで言いたいことは ここで言いたいことは・・・ こ しん おん ち 温故知新 ※ 故きを温ねて新しきを知れば、以って師と為るべし。 by 語源由来辞典 14 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 15. Ⅲ. 極力、シンプルなコードを cat <ファイル名> | sort | uniq q イル名 cat <ファイル名> | sort -u sort -u <ファイル名> 15 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 16. Ⅲ. 極力、シンプルなコードを パイプ、コマンドの動き cat <ファイル名> | sort -u u プロセスA プロセスB プロセスAとプロセスBは並行稼動 16 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 17. Ⅲ. 極力、シンプルなコードを find . -maxdepth 1 -mtime +200 –exec rm {} ¥; maxdepth mtime exec find . -maxdepth 1 -mtime +200 | xargs rm find . -maxdepth 1 -mtime +200 –exec rm {} + 17 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 18. Ⅲ. 極力、シンプルなコードを find -exec、xargsの動き 見つけたファイルに対し、1行ずつ find -exec ¥; 実行。複数回、同一のコマンドが実 実行 複数回 同一のコマンドが実 行される。 rm rm rm rm rm rm rm rm rm 18 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 19. Ⅲ. 極力、シンプルなコードを find -exec、xargsの動き 標準入力で渡されたリテラルを、 xargs 引数の限界(ARG_MAX)まで1つの 引数の限界(ARG MAX)まで1つの find -exec + オプションとして実行。同一のコマンド が、まとめて実行される。 rm rm 19 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 20. Ⅲ. 極力、シンプルなコードを 補足 『find -exec +』 は、語尾が 『{} +』 で終わる必要があります。 (『ls』 や 『rm』 では使えるが、『mv』 や 『cp』 では使えない) ○ find . -maxdepth 1 -mtime +200 -exec rm {} + × find . -maxdepth 1 -mtime +200 -exec mv {} backup + p p この先は、各コマンド(環境)依存です。※汎用的には厳しい。 (『mv』 や 『cp』 では、--target-directoryでクリア) ○ find . -maxdepth 1 -mtime +200 –exec mv --target-directory=backup {} + maxdepth mtime exec target directory backup ※BSD find . -maxdepth 1 -mtime +200 | xargs -J mv {} backup 20 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 21. Ⅲ. 極力、シンプルなコードを set timing on declare cursor c1 i select id,age from tbl_daityo; is l t id f tbl d it update tbl_daityo set kouza=kouza + 20000 r1 tbl_daityo%rowtype; where age > 64 or age < 19; begin g update tbl_daityo set kouza=kouza + 12000 for r1 in c1 loop where age > 18 and age < 65; if r1.age > 64 or r1.age < 19 then update tbl_daityo set kouza = kouza + 20000 where id = r1.id; else update tbl_daityo set kouza = kouza + 12000 where id = r1.id; end if if; update tbl_daityo end loop; set kouza=(case when age > 64 or age < 19 then kouza + 20000 commit; else kouza + 12000 end; end); 21 / Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 22. Ⅲ. 極力、シンプルなコードを PL/SQLエンジン、SQLエンジン declare cursor c1 is select id,age from tbl_daityo; r1 tbl_daityo%rowtype; SQL begin エンジン f for r1 in c1 loop p if r1.age > 64 or r1.age < 19 then update tbl_daityo set kouza = kouza + 20000 where id = r1.id; else ls PL/SQL update tbl_daityo set kouza = kouza + 12000 where id = r1.id; エンジン end if; end loop; commit; end; 22 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 23. Ⅲ. 極力、シンプルなコードを チューニング案件でよく聞く言葉 「SQL を見せてください」 「インデックスは有効ですか?」 「実行計画に問題はないですか?」 「アナライズは最新ですか?」 declare cursor c1 is select id,age from tbl_daityo; r1 tbl_daityo%rowtype; begin for r1 in c1 loop if r1.age > 64 or r1.age < 19 then これ update tbl daityo set kouza = kouza + 20000 where id = r1 id; tbl_daityo r1.id; else update tbl_daityo set kouza = kouza + 12000 where id = r1.id; end if; end loop; commit; 23 end; Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 24. Ⅲ. 極力、シンプルなコードを 是非、これも聞いて欲しい 「SQL は、どこからKickされますか?」 「トランザクション・フローを教えてください」 「トランザクション・フロ を教えてください」 「詳細設計書見せてください」 ※ やりすぎか・・・ ※ 8.1.6 以降 SQL-92 SQL 92 CASE ※ 9i 以降 MERGE SQL:2003 ※ 9i 以降 l 独自 Multi Table Insert l i bl i Oracle独自 ※ Bugにだけ、ご注意ください。。。 g 24 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 25. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 25 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 26. Ⅳ. デフォルトの設定って? インスタンス → memory_target ※11g 以降 降 ※10g 以降 sga_target sga target データベース → AUTOEXTEND 26 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 27. Oracle Unconference Ⅰ. 松下雅@コーソルって誰? Ⅱ. システムの構成を考えよう Ⅲ. 極力、シンプルなコードを Ⅲ 極力 シンプルな ドを Ⅳ. Ⅳ デフォルトの設定って? Ⅴ. Question & Answer . 27 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved
  • 28. Ⅴ 全体を通して Question & Answer 28 Copyright (C) 2009 CO-Sol Inc. All Rights Reserved