亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch15.htm

?? Learn SQL in an easy way...
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
for the sort area but less space for the rollback area.</P><P>Most transactions in an OLAP system take place as part of a batch process. Insteadof having several rollback areas for user input, you may resort to one large rollbackarea for the loads, which can be taken offline during daily activity to reduce overhead.<H2><FONT COLOR="#000077"><B>Batch Loads Versus Transactional Processing</B></FONT></H2><P>A major factor in the performance of a database and SQL statements is the typeof processing that takes place within a database. One type of processing is OLTP,discussed earlier today. When we talk about transactional processing, we are goingto refer to two types: user input and batch loads.</P><P>Regular user input usually consists of SQL statements such as <TT>INSERT</TT>,<TT>UPDATE</TT>, and <TT>DELETE</TT>. These types of transactions are often performedby the end user, or the customer. End users are normally using a front-end applicationsuch as PowerBuilder to interface with the database, and therefore they seldom issuevisible SQL statements. Nevertheless, the SQL code has already been generated forthe user by the front-end application.</P><P>Your main focus when optimizing the performance of a database should be the end-usertransactions. After all, &quot;no customer&quot; equates to &quot;no database,&quot;which in turn means that you are out of a job. Always try to keep your customershappy, even though their expectations of system/database performance may sometimesbe unreasonable. One consideration with end-user input is the number of concurrentusers. The more concurrent database users you have, the greater the possibilitiesof performance degradation.</P><P>What is a batch load? A <I>batch load</I> performs heaps of transactions againstthe database at once. For example, suppose you are archiving last year's data intoa massive history table. You may need to insert thousands, or even millions, of rowsof data into your history table. You probably wouldn't want to do this task manually,so you are likely to create a batch job or script to automate the process. (Numeroustechniques are available for loading data in a batch.) Batch loads are notoriousfor taxing system and database resources. These database resources may include tableaccess, system catalog access, the database rollback segment, and sort area space;system resources may include available CPU and shared memory. Many other factorsare involved, depending on your operating system and database server.</P><P>Both end-user transactions and batch loads are necessary for most databases tobe successful, but your system could experience serious performance problems if thesetwo types of processing lock horns. Therefore, you should know the difference betweenthem and keep them segregated as much as possible. For example, you would not wantto load massive amounts of data into the database when user activity is high. Thedatabase response may already be slow because of the number of concurrent users.Always try to run batch loads when user activity is at a minimum. Many shops reservetimes in the evenings or early morning to load data in batch to avoid interferingwith daily processing.</P><P>You should always plan the timing for massive batch loads, being careful to avoidscheduling them when the database is expected to be available for normal use. Figure15.1 depicts heavy batch updates running concurrently with several user processes,all contending for system resources.</P><P><A NAME="01"></A><A HREF="01.htm"><B>Figure 15.1.</B></A><B><BR></B><I>System resource contention.</I></P><P>As you can see, many processes are contending for system resources. The heavybatch updates that are being done throw a monkey wrench into the equation. Insteadof the system resources being dispersed somewhat evenly among the users, the batchupdates appear to be hogging them. This situation is just the beginning of resourcecontention. As the batch transactions proceed, the user processes may eventuallybe forced out of the picture. This condition is not a good way of doing business.Even if the system has only one user, significant contention for that user couldoccur.</P><P>Another problem with batch processes is that the process may hold locks on a tablethat a user is trying to access. If there is a lock on a table, the user will berefused access until the lock is freed by the batch process, which could be hours.Batch processes should take place when system resources are at their best if possible.Don't make the users' transactions compete with batch. Nobody wins that game.<H2><FONT COLOR="#000077"><B>Optimizing Data Loads by Dropping Indexes</B></FONT></H2><P>One way to expedite batch updates is by dropping indexes. Imagine the historytable with many thousands of rows. That history table is also likely to have oneor more indexes. When you think of an index, you normally think of faster table access,but in the case of batch loads, you can benefit by dropping the index(es).</P><P>When you load data into a table with an index, you can usually expect a greatdeal of index use, especially if you are updating a high percentage of rows in thetable. Look at it this way. If you are studying a book and highlighting key pointsfor future reference, you may find it quicker to browse through the book from beginningto end rather than using the index to locate your key points. (Using the index wouldbe efficient if you were highlighting only a small portion of the book.)</P><P>To maximize the efficiency of batch loads/updates that affect a high percentageof rows in a table, you can take these three basic steps to disable an index:<DL>	<DD><B>1. </B>Drop the appropriate index(es).<BR>	<BR>	<B>2. </B>Load/update the table's data.<BR>	<BR>	<B>3.</B> Rebuild the table's index.</DL><H2><FONT COLOR="#000077"><B>A Frequent </B><TT>COMMIT</TT><B> Keeps the DBA Away</B></FONT></H2><P>When performing batch transactions, you must know how often to perform a &quot;commit.&quot;As you learned on Day 11, &quot;Controlling Transactions,&quot; a <TT>COMMIT</TT>statement finalizes a transaction. A <TT>COMMIT</TT> saves a transaction or writesany changes to the applicable table(s). Behind the scenes, however, much more isgoing on. Some areas in the database are reserved to store completed transactionsbefore the changes are actually written to the target table. Oracle calls these areas<I>rollback segments</I>. When you issue a <TT>COMMIT</TT> statement, transactionsassociated with your SQL session in the rollback segment are updated in the targettable. After the update takes place, the contents of the rollback segment are removed.A <TT>ROLLBACK</TT> command, on the other hand, clears the contents of the rollbacksegment without updating the target table.</P><P>As you can guess, if you never issue a <TT>COMMIT</TT> or <TT>ROLLBACK</TT> command,transactions keep building within the rollback segments. Subsequently, if the datayou are loading is greater in size than the available space in the rollback segments,the database will essentially come to a halt and ban further transactional activity.Not issuing <TT>COMMIT</TT> commands is a common programming pitfall; regular <TT>COMMIT</TT>shelp to ensure stable performance of the entire database system.</P><P>The management of rollback segments is a complex and vital database administrator(DBA) responsibility because transactions dynamically affect the rollback segments,and in turn, affect the overall performance of the database as well as individualSQL statements. So when you are loading large amounts of data, be sure to issue the<TT>COMMIT</TT> command on a regular basis. Check with your DBA for advice on howoften to commit during batch transactions. (See Figure 15.2.)</P><P><A NAME="02"></A><A HREF="02.htm"><B>Figure 15.2.</B></A><B><BR></B><I>The rollback area.</I></P><P>As you can see in Figure 15.2, when a user performs a transaction, the changesare retained in the rollback area.<H2><FONT COLOR="#000077"><B>Rebuilding Tables and Indexes in a Dynamic Environment</B></FONT></H2><P>The term <I>dynamic database environment </I>refers to a large database that isin a constant state of change. The changes that we are referring to are frequentbatch updates and continual daily transactional processing. Dynamic databases usuallyentail heavy OLTP systems, but can also refer to DSSs or data warehouses, dependingupon the volume and frequency of data loads.</P><P>The result of constant high-volume changes to a database is growth, which in turnyields fragmentation. Fragmentation can easily get out of hand if growth is not managedproperly. Oracle allocates an initial extent to tables when they are created. Whendata is loaded and fills the table's initial extent, a next extent, which is alsoallocated when the table is created, is taken.</P><P>Sizing tables and indexes is essentially a DBA function and can drastically affectSQL statement performance. The first step in growth management is to be proactive.Allow room for tables to grow from day one, within reason. Also plan to defragmentthe database on a regular basis, even if doing so means developing a weekly routine.Here are the basic conceptual steps involved in defragmenting tables and indexesin a relational database management system:<DL>	<DD><B>1. </B>Get a good backup of the table(s) and/or index(es).<BR>	<BR>	<B>2. </B>Drop the table(s) and/or index(es).<BR>	<BR>	<B>3. </B>Rebuild the table(s) and/or index(es) with new space allocation.<BR>	<BR>	<B>4. </B>Restore the data into the newly built table(s).<BR>	<BR>	<B>5.</B> Re-create the index(es) if necessary.<BR>	<BR>	<B>6. </B>Reestablish user/role permissions on the table if necessary.<BR>	<BR>	<B>7. </B>Save the backup of your table until you are absolutely sure that the new	table was built successfully. If you choose to discard the backup of the original	table, you should first make a backup of the new table after the data has been fully	restored.</DL><BLOCKQUOTE>	<P><HR><FONT COLOR="#000077"><B>WARNING:</B></FONT><B> </B>Never get rid of the backup of	your table until you are sure that the new table was built successfully. <HR></BLOCKQUOTE><P>The following example demonstrates a practical use of a mailing list table inan Oracle database environment.<H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">CREATE TABLE MAILING_TBL_BKUP AS<B>SELECT * FROM MAILING_TBL;</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">Table Created.</FONT></PRE><H5><FONT COLOR="#000000">INPUT/OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF"><B>drop table mailing_tbl;</B>Table Dropped.<B>CREATE TABLE MAILING_TBL    (    INDIVIDUAL_ID        VARCHAR2(12)     NOT NULL,    INDIVIDUAL_NAME    VARCHAR2(30)    NOT NULL,    ADDRESS            VARCHAR(40)    NOT NULL,    CITY            VARCHAR(25)    NOT NULL,    STATE            VARCHAR(2)    NOT NULL,    ZIP_CODE        VARCHAR(9)    NOT NULL,    )    TABLESPACE TABLESPACE_NAME    STORAGE    (    INITIAL        NEW_SIZE,            NEXT        NEW_SIZE    );</B>Table created.<B>INSERT INTO MAILING_TBLselect * from mailing_tbl_bkup;</B>93,451 rows inserted.<B>CREATE INDEX MAILING_IDX ON MAILING TABLE    (    INDIVIDUAL_ID    )    TABLESPACE TABLESPACE_NAME    STORAGE    (    INITIAL        NEW_SIZE,            NEXT        NEW_SIZE    );</B>Index Created.<B>grant select on mailing_tbl to public;</B>Grant Succeeded.<B>drop table mailing_tbl_bkup;</B>Table Dropped.</FONT></PRE><H5>ANALYSIS:</H5><P>Rebuilding tables and indexes that have grown enables you to optimize storage,which improves overall performance. Remember to drop the backup table only afteryou have verified that the new table has been created successfully. Also keep inmind that you can achieve the same results with other methods. Check the optionsthat are available to you in your database documentation.<H2><FONT COLOR="#000077"><B>Tuning the Database</B></FONT></H2><P>Tuning a database is the process of fine-tuning the database server's performance.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
**网站欧美大片在线观看| 色婷婷亚洲婷婷| 不卡的av网站| 在线亚洲精品福利网址导航| 欧美一区二区三区在线电影| 久久久久久9999| 亚洲女性喷水在线观看一区| 日本怡春院一区二区| 国产福利一区二区| 色乱码一区二区三区88| 日韩美女视频在线| 亚洲欧美综合网| 青娱乐精品在线视频| 白白色 亚洲乱淫| 亚洲gay无套男同| 久88久久88久久久| 色琪琪一区二区三区亚洲区| 91麻豆精品91久久久久同性| 中文字幕不卡一区| 奇米精品一区二区三区四区 | www.亚洲在线| 在线播放国产精品二区一二区四区 | 久久女同精品一区二区| 亚洲精品成人精品456| 国内精品久久久久影院色| 色婷婷综合久久久久中文 | 久久91精品国产91久久小草| 色婷婷综合久久久久中文一区二区| 欧美一级生活片| 综合激情网...| 久久se精品一区精品二区| 91精品1区2区| 中文字幕免费在线观看视频一区| 日本女人一区二区三区| 91视频你懂的| 国产欧美视频一区二区三区| 视频一区欧美精品| 91麻豆国产香蕉久久精品| 欧美tickling挠脚心丨vk| 亚洲综合色成人| 成人国产一区二区三区精品| 精品久久久久一区| 亚洲va天堂va国产va久| 91麻豆.com| 国产亚洲欧洲一区高清在线观看| 午夜视频久久久久久| 一本久道中文字幕精品亚洲嫩| 国产偷国产偷亚洲高清人白洁| 免费观看一级特黄欧美大片| 91国产精品成人| 亚洲日本一区二区三区| 国产91精品免费| 精品国产99国产精品| 日韩国产欧美三级| 欧美性生交片4| 亚洲欧美一区二区久久| 国产91高潮流白浆在线麻豆| 久久影院午夜片一区| 蜜桃久久久久久| 91精品国产综合久久久久久漫画| 亚洲国产综合人成综合网站| 欧美系列日韩一区| 一区二区三区在线免费| 在线亚洲一区二区| 一区二区三区小说| 色先锋aa成人| 亚洲激情av在线| 91久久精品一区二区三| 亚洲精品日产精品乱码不卡| 91免费视频网| 综合av第一页| 色哟哟国产精品| 一区二区在线观看视频在线观看| 91蜜桃网址入口| 亚洲欧美国产高清| 在线精品视频免费观看| 欧美午夜片在线看| 一区二区高清免费观看影视大全| 在线影院国内精品| 午夜欧美2019年伦理| 在线成人高清不卡| 免费的国产精品| 精品国产一区二区精华| 国产一本一道久久香蕉| 国产亚洲一区字幕| 99久久精品费精品国产一区二区| 亚洲人精品一区| 91精品福利视频| 日韩精品福利网| 欧美电视剧免费全集观看| 黄色日韩三级电影| 国产精品毛片久久久久久| 91浏览器在线视频| 婷婷成人激情在线网| 精品久久国产97色综合| 国产河南妇女毛片精品久久久| 中文字幕五月欧美| 91精品国产品国语在线不卡| 欧美成人激情免费网| 日韩三级电影网址| 欧美日韩高清在线| 精品久久一二三区| 久久嫩草精品久久久精品| 国产亚洲欧美一区在线观看| 91麻豆精品国产91久久久久| 制服丝袜一区二区三区| 94-欧美-setu| 国产经典欧美精品| 久久99精品久久只有精品| 亚洲欧美日韩国产手机在线 | av动漫一区二区| 亚洲精品久久嫩草网站秘色| 5月丁香婷婷综合| 国产成人在线色| 一二三四区精品视频| 精品久久久久久久久久久院品网| 成人激情小说网站| 亚洲成人三级小说| 久久亚洲免费视频| 日本精品视频一区二区三区| 欧美a级一区二区| 国产精品久久久久久久久久久免费看 | 欧美日韩色综合| 国模少妇一区二区三区| 一区二区三区中文字幕电影| 精品裸体舞一区二区三区| 99国产精品视频免费观看| 麻豆91免费看| 亚洲激情成人在线| 久久丝袜美腿综合| 欧美日韩一区二区三区在线| 国产高清精品在线| 日韩av一区二区在线影视| 国产精品久久久久永久免费观看| 4438x亚洲最大成人网| 成人av电影在线| 免费一级片91| 亚洲柠檬福利资源导航| 久久久亚洲精华液精华液精华液| 在线视频欧美精品| 成人久久18免费网站麻豆| 美女高潮久久久| 亚洲制服丝袜av| 国产精品久久二区二区| 日韩三级在线观看| 欧美性猛交xxxx乱大交退制版| 国产伦精品一区二区三区免费迷 | 久久精品二区亚洲w码| 亚洲伊人色欲综合网| 国产精品私人自拍| 精品捆绑美女sm三区| 欧美精品国产精品| 欧美亚洲国产怡红院影院| eeuss鲁片一区二区三区| 国产精品自拍一区| 免费成人美女在线观看| 一区二区三区国产精品| 国产精品理伦片| 亚洲精品一区二区三区精华液| 欧美美女喷水视频| 色哟哟一区二区| 99久久久无码国产精品| 国产精品主播直播| 国模套图日韩精品一区二区 | 欧美一级片在线观看| 色噜噜久久综合| 91一区二区在线| 成人理论电影网| 国产精品自拍一区| 国产精品正在播放| 精品无人码麻豆乱码1区2区| 日韩黄色片在线观看| 亚洲电影第三页| 亚洲综合视频网| 亚洲一区视频在线观看视频| 亚洲美女视频一区| 中文字幕一区二区三区不卡 | youjizz久久| 成人一级片网址| 处破女av一区二区| 成人午夜视频在线观看| 国产成人av电影在线播放| 国产成人免费在线| 国产宾馆实践打屁股91| 国产成人一级电影| 成人理论电影网| 91在线porny国产在线看| 成人aaaa免费全部观看| www.久久久久久久久| 91免费版在线| 欧美亚洲一区二区在线| 欧美日韩亚洲国产综合| 欧美日韩大陆一区二区| 91精品国产一区二区| 日韩美女在线视频| 久久久久久久久久久久电影| 国产欧美一区二区三区在线看蜜臀| 国产精品欧美一区喷水| 亚洲精品乱码久久久久久久久 | 91免费版在线|