?? ch15.htm
字號:
As a newcomer to SQL, you probably will not be exposed to database tuning unlessyou are a new DBA or a DBA moving into a relational database environment. Whetheryou will be managing a database or using SQL in applications or programming, youwill benefit by knowing something about the database-tuning process. The key to thesuccess of any database is for all parties to work together. Some general tips fortuning a database follow.<UL> <LI>Minimize the overall size required for the database.</UL><DL> <DD>It's good to allow room for growth when designing a database, but don't go overboard. Don't tie up resources that you may need to accommodate database growth.</DL><UL> <LI>Experiment with the user process's time-slice variable.</UL><DL> <DD>This variable controls the amount of time the database server's scheduler allocates to each user's process.</DL><UL> <LI>Optimize the network packet size used by applications.</UL><DL> <DD>The larger the amount of data sent over the network, the larger the network packet size should be. Consult your database and network documentation for more details.</DL><UL> <LI>Store transaction logs on separate hard disks.</UL><DL> <DD>For each transaction that takes place, the server must write the changes to the transaction logs. If you store these log files on the same disk as you store data, you could create a performance bottleneck. (See Figure 15.3.)</DL><UL> <LI>Stripe extremely large tables across multiple disks.</UL><DL> <DD>If concurrent users are accessing a large table that is spread over multiple disks, there is much less chance of having to wait for system resources. (See Figure 15.3.)</DL><UL> <LI>Store database sort area, system catalog area, and rollback areas on separate hard disks.</UL><DL> <DD>These are all areas in the database that most users access frequently. By spreading these areas over multiple disk drives, you are maximizing the use of system resources. (See Figure 15.3.)</DL><UL> <LI>Add CPUs.</UL><DL> <DD>This system administrator function can drastically improve database performance. Adding CPUs can speed up data processing for obvious reasons. If you have multiple CPUs on a machine, then you may be able to implement parallel processing strategies. See your database documentation for more information on parallel processing, if it is available with your implementation.</DL><UL> <LI>Add memory.</UL><DL> <DD>Generally, the more the better.</DL><UL> <LI>Store tables and indexes on separate hard disks.</UL><DL> <DD>You should store indexes and their related tables on separate disk drives when- ever possible. This arrangement enables the table to be read at the same time the index is being referenced on another disk. The capability to store objects on multiple disks may depend on how many disks are connected to a controller. (See Figure 15.3.)</DL><P>Figure 15.3 shows a simple example of how you might segregate the major areasof your database.</P><P><A NAME="03"></A><A HREF="03.htm"><B>Figure 15.3.</B></A><B><BR></B><I>Using available disks to enhance performance.</I></P><P>The scenario in Figure 15.3 uses four devices: disk01 through disk04. The objectivewhen spreading your heavy database areas and objects is to keep areas of high useaway from each another.<UL> <LI>Disk01-- The system catalog stores information about tables, indexes, users, statistics, database files, sizing, growth information, and other pertinent data that is often accessed by a high percentage of transactions.<BR> <BR> <LI>Disk02--Transaction logs are updated every time a change is made to a table (insert, update, or delete). Transaction logs are a grand factor in an online transactional database. They are not of great concern in a read-only environment, such as a data warehouse or DSS.<BR> <BR> <LI>Disk03--Rollback segments are also significant in a transactional environment. However, if there is little transactional activity (insert, update, delete), rollback segments will not be heavily used.<BR> <BR> <LI>Disk04-- The database's sort area, on the other hand, is used as a temporary area for SQL statement processing when sorting data, as in a <TT>GROUP BY</TT> or <TT>ORDER BY</TT> clause. Sort areas are typically an issue in a data warehouse or DSS. However, the use of sort areas should also be considered in a transactional environment.</UL><BLOCKQUOTE> <P><HR><FONT COLOR="#000077"><B>TIP:</B></FONT><B> </B>Also note how the application tables and indexes have been placed on each disk. Tables and indexes should be spread as much as possible. <HR></BLOCKQUOTE><P>Notice that in Figure 15.3 the tables and indexes are stored on different devices.You can also see how a "Big Table" or index may be <I>striped</I> acrosstwo or more devices. This technique splits the table into smaller segments that canbe accessed simultaneously. Striping a table or index across multiple devices isa way to control fragmentation. In this scenario, tables may be read while theircorresponding indexes are being referenced, which increases the speed of overalldata access.</P><P>This example is really quite simple. Depending on the function, size, and system-relatedissues of your database, you may find a similar method for optimizing system resourcesthat works better. In a perfect world where money is no obstacle, the best configurationis to have a separate disk for each major database entity, including large tablesand indexes.<BLOCKQUOTE> <P><HR><FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>The DBA and system administrator should work together to balance database space allocation and optimize the memory that is available on the server. <HR></BLOCKQUOTE><P>Tuning a database very much depends on the specific database system you are using.Obviously, tuning a database entails much more than just preparing queries and lettingthem fly. On the other hand, you won't get much reward for tuning a database whenthe application SQL is not fine-tuned itself. Professionals who tune databases fora living often specialize on one database product and learn as much as they possiblycan about its features and idiosyncrasies. Although database tuning is often lookedupon as a painful task, it can provide very lucrative employment for the people whotruly understand it.<H2><FONT COLOR="#000077"><B>Performance Obstacles</B></FONT></H2><P>We have already mentioned some of the countless possible pitfalls that can hinderthe general performance of a database. These are typically general bottlenecks thatinvolve system-level maintenance, database maintenance, and management of SQL statementprocessing.</P><P>This section summarizes the most common obstacles in system performance and databaseresponse time.<UL> <LI>Not making use of available devices on the server--A company purchases multiple disk drives for a reason. If you do not use them accordingly by spreading apart the vital database components, you are limiting the performance capabilities. Maximizing the use of system resources is just as important as maximizing the use of the database server capabilities.<BR> <BR> <LI>Not performing frequent <TT>COMMIT</TT>s--Failing to use periodic <TT>COMMIT</TT>s or <TT>ROLLBACK</TT>s during heavy batch loads will ultimately result in database bottlenecks.<BR> <BR> <LI>Allowing batch loads to interfere with daily processing--Running batch loads during times when the database is ex亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人成精品久久久久久|
国产精品一级片|
精品国产凹凸成av人网站|
色婷婷精品大视频在线蜜桃视频|
成人一区二区三区视频在线观看|
精品亚洲aⅴ乱码一区二区三区|
中文字幕一区二区三|
久久久久久久久久看片|
欧美成va人片在线观看|
精品久久久久av影院
|
一级特黄大欧美久久久|
国产精品人妖ts系列视频|
国产精品免费丝袜|
亚洲欧洲一区二区三区|
亚洲猫色日本管|
亚洲人亚洲人成电影网站色|
中文字幕综合网|
亚洲精品久久嫩草网站秘色|
亚洲天堂av老司机|
亚洲午夜一区二区|
天天影视涩香欲综合网|
日产国产欧美视频一区精品|
一区二区激情视频|
亚洲大片一区二区三区|
免费人成网站在线观看欧美高清|
婷婷一区二区三区|
蜜桃精品在线观看|
国产成人av资源|
国产精品456|
99这里只有精品|
5566中文字幕一区二区电影|
日韩欧美一区电影|
国产精品蜜臀在线观看|
一区二区在线观看免费视频播放|
午夜免费久久看|
国产乱码字幕精品高清av
|
国产电影一区二区三区|
99久久精品费精品国产一区二区|
欧美日韩国产一二三|
91精品国产色综合久久久蜜香臀|
精品区一区二区|
一区二区三区免费网站|
精品一区二区三区在线观看|
99国产麻豆精品|
精品不卡在线视频|
亚洲午夜一二三区视频|
成人午夜激情视频|
欧美无人高清视频在线观看|
欧美不卡在线视频|
中文字幕在线一区免费|
午夜精品免费在线观看|
国产乱子轮精品视频|
成人免费视频免费观看|
精品久久久久久无|
五月天中文字幕一区二区|
av成人免费在线|
精品剧情在线观看|
日韩影院在线观看|
色呦呦国产精品|
国产日韩欧美一区二区三区乱码|
午夜伦欧美伦电影理论片|
99综合影院在线|
久久久久亚洲蜜桃|
精品中文字幕一区二区|
91麻豆精品国产自产在线观看一区|
国产精品传媒入口麻豆|
国产99久久久精品|
国产欧美日韩中文久久|
激情欧美一区二区|
久久香蕉国产线看观看99|
免费日韩伦理电影|
久久精品一区二区三区四区
|
精品视频一区二区不卡|
亚洲欧洲精品天堂一级|
成人在线一区二区三区|
国产精品日产欧美久久久久|
成人综合婷婷国产精品久久免费|
国产日产精品1区|
国产成a人无v码亚洲福利|
国产三级一区二区三区|
国产高清久久久久|
国产精品美女视频|
色av综合在线|
亚洲电影一区二区三区|
欧美日韩国产综合一区二区
|
成人综合婷婷国产精品久久蜜臀|
国产色婷婷亚洲99精品小说|
av一区二区三区在线|
中文字幕视频一区|
在线精品视频免费观看|
亚洲v日本v欧美v久久精品|
欧美一区二区三区四区五区|
免费日本视频一区|
国产欧美日本一区二区三区|
99视频精品全部免费在线|
一区二区免费看|
7777精品伊人久久久大香线蕉的|
麻豆精品精品国产自在97香蕉|
久久夜色精品国产欧美乱极品|
懂色av中文字幕一区二区三区|
综合久久一区二区三区|
欧美理论片在线|
国产精品2024|
亚洲黄一区二区三区|
日韩一级高清毛片|
eeuss国产一区二区三区|
亚洲精品成人天堂一二三|
欧美日本在线一区|
国产成人av资源|
午夜精品爽啪视频|
国产精品久久久久9999吃药|
欧美日韩不卡一区二区|
国产91综合一区在线观看|
亚洲一区二区三区免费视频|
久久―日本道色综合久久|
欧美最猛黑人xxxxx猛交|
国产在线观看一区二区|
一区二区高清免费观看影视大全|
欧美v国产在线一区二区三区|
99精品桃花视频在线观看|
蜜桃免费网站一区二区三区|
亚洲欧美激情插|
久久精品免视看|
欧美一区中文字幕|
色综合中文字幕|
国产jizzjizz一区二区|
青草av.久久免费一区|
亚洲视频一区二区免费在线观看|
日韩三级.com|
9191国产精品|
一本色道久久综合狠狠躁的推荐|
狠狠网亚洲精品|
日本少妇一区二区|
狠狠色丁香婷综合久久|
亚洲人成电影网站色mp4|
国产性做久久久久久|
日韩女同互慰一区二区|
欧美日本在线播放|
在线观看日韩高清av|
97精品国产露脸对白|
国产传媒日韩欧美成人|
精品综合免费视频观看|
美女www一区二区|
日本怡春院一区二区|
亚洲成人精品在线观看|
亚洲综合丝袜美腿|
一区二区三区波多野结衣在线观看
|
国产成人8x视频一区二区|
激情欧美一区二区三区在线观看|
日韩成人精品在线观看|
日韩中文字幕av电影|
午夜影视日本亚洲欧洲精品|
亚洲影视在线观看|
亚洲精品成人a在线观看|
亚洲色图欧洲色图|
亚洲免费在线播放|
亚洲电影你懂得|
蜜臀av性久久久久蜜臀aⅴ|
久久福利资源站|
国产一区二区三区日韩|
国产经典欧美精品|
北条麻妃一区二区三区|
91小宝寻花一区二区三区|
色婷婷国产精品综合在线观看|
色哟哟欧美精品|
欧美日韩视频专区在线播放|
欧美男生操女生|
26uuu精品一区二区在线观看|
精品国产区一区|
亚洲欧美综合网|
亚洲一线二线三线视频|
天天色天天操综合|
国产一区二区三区国产|
成人动漫在线一区|
色一情一伦一子一伦一区|
欧美三区在线观看|
精品国产91乱码一区二区三区|
国产亚洲欧洲997久久综合|
亚洲男人天堂一区|
日本欧美韩国一区三区|
国产大陆亚洲精品国产|
欧美亚洲国产一区二区三区|
日韩视频在线你懂得|
国产精品女主播在线观看|
亚洲一区二区综合|
99精品国产99久久久久久白柏|
在线免费观看日本欧美|
欧美成人a视频|
亚洲精品成人天堂一二三|
久久不见久久见中文字幕免费|
成人动漫精品一区二区|
欧美精品一二三|
国产精品美女久久久久久久久
|
一区二区三区鲁丝不卡|
轻轻草成人在线|
一本色道a无线码一区v|
欧美tickling网站挠脚心|
亚洲日本在线a|
国产一区二区成人久久免费影院|
欧美自拍偷拍一区|