簡述Oracle優化器的優化方式

不同的情況,壹條SQL可能有多種執行計劃,但在某壹時點,壹定只有壹種執行計劃是最優的,花費時間是最少的。相信妳壹定會用Pl/sql Developer、Toad等工具去看壹個語句的執行計劃,不過妳可能對Rule、Choose、First rows、All rows這幾項有疑問,因為我當初也是這樣的,那時我也疑惑為什麽選了以上的不同的項,執行計劃就變了?

  1、Oracle優化器的優化方式

  Oracle優化器共有兩種的優化方式,即基於規則的優化方式(Rule-Based Optimization,簡稱為RBO)和基於代價的優化方式(Cost-Based Optimization,簡稱為CBO)。

  A、RBO方式:優化器在分析SQL語句時,所遵循的是Oracle內部預定的壹些規則。比如我們常見的,當壹個where子句中的壹列有索引時去走索引。

  B、CBO方式:依詞義可知,它是看語句的代價(Cost)了,這裏的代價主要指Cpu和內存。優化器在判斷是否用這種方式時,主要參照的是表及索引的統計信息。統計信息給出表的大小 、有少行、每行的長度等信息。這些統計信息起初在庫內是沒有的,是妳在做analyze後才出現的,很多的時侯過期統計信息會令優化器做出壹個錯誤的執行計劃,因些我們應及時更新這些信息。在Oracle8及以後的版本,Oracle列推薦用CBO的方式。

  我們要明了,不壹定走索引就是優的 ,比如壹個表只有兩行數據,壹次IO就可以完成全表的檢索,而此時走索引時則需要兩次IO,這時對這個表做全表掃描(full table scan)是最好的。

  2、Oracle優化器的優化模式(Optermizer Mode)

  優化模式包括Rule,Choose,First rows,All rows這四種方式,也就是我們以上所提及的。如下我解釋壹下:

  Rule:不用多說,即走基於規則的方式。

  Choolse:這是我們應觀註的,默認的情況下Oracle用的便是這種方式。指的是當壹個表或或索引有統計信息,則走CBO的方式,如果表或索引沒統計信息,表又不是特別的小,而且相應的列有索引時,那麽就走索引,走RBO的方式。

  First Rows:它與Choose方式是類似的,所不同的是當壹個表有統計信息時,它將是以最快的方式返回查詢的最先的幾行,從總體上減少了響應時間。

  All Rows:也就是我們所說的Cost的方式,當壹個表有統計信息時,它將以最快的方式返回表的所有的行,從總體上提高查詢的吞吐量。沒有統計信息則走基於規則的方式。

  3、如何設定選用哪種優化模式

  ◆A、Instance級別

  我們可以通過在init.ora文件中設定OPTIMIZER_MODE=RULE、OPTIMIZER_MODE=CHOOSE、OPTIMIZER_MODE=FIRST_ROWS、OPTIMIZER_MODE=ALL_ROWS去選用3所提的四種方式,如果妳沒設定OPTIMIZER_MODE參數則默認用的是Choose這種方式。

  ◆B、Sessions級別

  通過SQL> ALTER SESSION SET OPTIMIZER_MODE=;來設定。

  ◆C、語句級別

  這些需要用到Hint

Technology Architect Solutions Design

        隨著電氣電子技術的發展,家用電器產品日益普及和電子化,廣播電視、郵電通訊和電腦網路的日益發達,電磁環境日益複雜和惡化,使得電氣電子產品的電磁兼容性(EMC電磁干擾EMI與電磁抗EMS)問題也受到各國政府和生產企業的日益重視。電子、電器產品的電磁兼容性(EMC)是一項非常重要的質量指標,它不僅關係到產品本身的工作可靠性和使用安全性,而且還可能影響到其他設備和系統的正常工作,關係到電磁環境的保護問題。 歐共體政府規定,從1996年1月1起,所有電氣電子產品必須通過EMC認證,加貼CE標誌後才能在歐共體市場上銷售。此舉在世界上引起廣泛影響,各國政府紛紛採取措施,對電氣電子產品的RMC性能實行強制性管理。國際上比較有影響的,例如歐盟89/336/EEC指令(即EMC指令)、美國聯邦法典CFR 47/FCC Rules等都對電磁兼容認證提出了明確的要求。

       E20-322 屬於EMC認證中的一門考試

1. A customer is deploying a new Microsoft Exchange environment and has requested assistance with the
associated disk design. They are deploying Exchange for 850 users with an average of 3 I/Os per user.
They expect a 60% read and 40% write distribution.
The customer would like to know the number of disks required for both RAID 5 and RAID 1/0 DMX
configurations with 15k rpm drives. How many disks are required for each configuration type?
A. RAID 5 28 and RAID 1/0 18
B. RAID 5 31 and RAID 1/0 20
C. RAID 5 38 and RAID 1/0 24
D. RAID 5 43 and RAID 1/0 28
Answer: A
2. A customer plans to create two regional offices that are between 800 and 2,000 km away from their
main data center. Each regional office will have a data center that will serve four to six branch offices
between 30 and 50 km away.
At the close of business each evening the customer will shut down the application and transmit changes
to each regional office. The amount of new information sent from the head office each night will vary from
0.5 and 1.5 GB. Later each night, an application at the regional offices will read the data from the head
office and generate approximately 50 MB of new rate information appropriate for its branch offices.
What is the most cost-effective EMC solution?
A. 1. Configure CLARiiON arrays in each office.
2. Use MirrorView/A and T3 networks for all data transfers.
B. 1. Configure Symmetrix arrays in the head office and CLARiiONs in the regional offices.
2. Use OC-3 networks to transmit the same master copy of data from the head office to the regional
offices using Open Replicator.
3. At the regional offices, create a snap of the data received and transmit the changes to the branch
offices using SAN Copy.
C. 1. Configure Symmetrix arrays at all the main data centers and CLARiiONs at the regional and branch
offices.
2. Use OC-3 network links between the main data centers.
3. Use DS-3 between the regional and branch offices.
4. Use SRDF/DM for data transfer in each case.
D. 1. Configure Symmetrix arrays at the head office and regional offices.
2. Configure CLARiiONs at the branch offices.
3. Use SRDF/DM and T1 network links between the head office and regional offices.
4. Use Open Replicator incremental offline push to distribute rate information to the branch offices
using T1 network links.
Answer: D
3. A customer decided to consolidate their storage onto a Symmetrix. They have a mix of Windows and
UNIX servers and want one copy of data for creating backups each night. They also want another copy to
be made during the day. This second copy will be a standby to perform a fast recovery in the event of data
corruption.
The initial survey of the customer environment shows that the read/write ratio of their application is 1. 2
during the day and 5. 1 at night. The application appears to be highly sensitive to disk response times
during the day.
Which initial solution should be considered?
A. TimeFinder/Clones for the standby copy and TimeFinder/Mirror BCVs for backups at night
B. TimeFinder/Snap for the standby copy and TimeFinder/Clone for backups at night
C. TimeFinder/Snap for the standby copy and TimeFinder/Mirror BCVs for backups at night
D. TimeFinder/Mirror BCVs for the standby copy and TimeFinder/Snaps for backups at night
Answer: D

Adobe公司簡介與Flash 9A0-092 考題

美國Adobe公司是世界上第二大桌面軟體公司,產品涉及圖形設計、圖像製作、數碼視頻和網頁製作等領域。其中,以Photoshop為首的圖像處理軟體更是享譽平面設計領域。 使用Adobe產品,人們的創作才華可盡情施展,創意、出版和傳播各種具有豐富視覺效果的作品,其無與倫比的圖形圖像功能,倍受網頁和圖像設計人員、專業出版人員、商務人員和設計愛好者的喜愛。

Adobe多媒體網頁設計目前已成為各族群追求的主流軟體,對於多媒體網頁編輯設計有興趣者、網頁設計SOHO族、欲培養網頁設計、行銷企畫第二專長、電腦動畫設計等人員,進修多媒體網頁設計軟體已是刻不容緩的事實,並且是最佳的選擇。結合專業繪圖及動畫影像設計軟體,將各種技巧整合而創造出多采多姿、夢幻綺麗的多媒體網頁,此創意已蔚為一股風潮,亦是所有美術設計與網頁設計工作者必須涉獵的基本要件。

通過了9A0-092 考題,說明你已經掌握了Flash的精髓,會獲得Adobe公司的相關證書,以下是9A0-092的部份考題。

1. Which keyword is associated with creating subclasses?
Select the best response.
A. implements
B. extends
C. inherits
D. subclass
Answer: B 
2. Which is an advantage of using the Document class as implemented in ActionScript 3?
Select the best response.
A. You no longer have to write any code in any frame on the main timeline.
B. The Document class is the final code executed in any SWF file.
C. Use of the Document class prevents the need for external ActionScript files.
D. The Document class cannot contain any functions, allowing for decentralized storage.
Answer: A 
3. Which class must a Document class extend in ActionScript 3.0?
Select the best response.
A. EventDispatcher
B. Sprite
C. Document
D. A Document class is not required to exte
Answer: B