




下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、外文翻译about the database of the knowledge of the deadlockdatabase itself provides lock management mechanism, but from a hand, database is the client applications puppet, this is mainly because the client to the server has complete control of the gain of locks ability. the client in enquiries in the re
2、quest and the way to query processing tend to have direct control, so, if we application design reasonable enough, then appear database is normal phenomenon dead lock.below are listed some easy to have locked application examples:a, the client cancel inquires no roll back after practice.most of the
3、application is inquires often happens homework. however, users through the front desk the client application inquires the backend database, sometimes will cancel inquires for any variety of reasons. if the user to open the window after mouth query, because users find reflect crash or slow compelled
4、to cancel the query. but, when the client when cancel inquires, if not add rollback transaction statement, then at this time, because the user has to the server sends the inquirys request, so, the backend database involved in the table, all have been added l locked. so even if the user cancel after
5、inquires, all in the affairs for the locks within will remain. at this point, if other users need to check on the table or the user to open the window through input inquires to query conditions to improve the system response speed occurs when the jam phenomenon.second, the client not to get all the
6、results of my query.usually, the user will be sent to the server after queries, foreground application must be done at once extraction all the results do. if the application did not extract all the results trip, it produces a problem. for as long as the application did not withdraw promptly all the
7、results, the lock may stay at table and block other users. since the application has been submitted to the server will sq statements, the application must be extracted all results do. if the application does not follow the principle words (such as because at that time and no oversight configuration)
8、, cant fundamentally solve congestion.three, inquires the execution time too long.some inquires a relatively long time will cost. as for the query design is not reasonable or query design to watch and record it is, will make inquires the execution time lengthen. if sometimes need to update on users
9、record or delete operation, if the line is involved in it, you will get a lot of lock. these locks whether finally upgrade to watch the lock, can block other inquiries.so often, dont take long time running decision support search and online transaction processing inquires the mixed together.when dat
10、abase meet blocked, often need to check the application submitted to the sql statement itself, and check and connection management, all the results do processing and other relevant application behavior. usually, the lock for to avoid the conflict in the jam, the author has the following suggestions.
11、suggest a: after the completion of the extraction of all query results do.some applications in order to improve the response speed of the user inquires, will have the option of extraction need record. the smart looks very reasonable, but, but will cause more waste. because inquires not timely and fr
12、uit extraction of words, the lock cannot be released. when others inquires the data, will be happening.so, the author suggest in application design, database query for record to the extraction of in time. through other means, such as adding inquires the conditions, or the way backstage inquires, to
13、improve the efficiency of the inquires. at the same time, in the application level set reasonable cache, and can also be very significantly improved query efficiency.suggest two: in the transaction execution dont let the user input content.although in the affairs of the process with sex, can let the
14、 user participation, in order to improve the interactivity. but, we dont recommend the database administrator tend to do so. because if the user in affairs during the execution of the input and number, will extend the affairs of the execution time. although people smarter, but the response speed sti
15、ll dont have a computer so fast. so, during the implementation of the user participation to let the process, will extend the affairs of waiting time. so unless there is a special needs, not in the applications execution process, reminds the user input parameters. some affairs of the executive must p
16、arameters, best provide beforehand. if can through the variables in the parameters such as need to go in.suggest three: make affairs as far as possible the brief.the author thinks that, database administrator should put some problem is simplified. when a need to many sql statements to complete, migh
17、t as well take the task decomposition. at the same time, it breaks down into some brief business affairs.if the database a product information table, its record number two million. now in a management needs, the one-time change one of the one million five hundred thousand record. if through a change
18、 affairs, the time is long. if it involves cascade update it, is time the meeting is longer.in view of this situation, we can learn affairs brief words. if the product information, may have a product type field. so in the update data, can we not one-time updates. but through the product category fie
19、lds to control, to record the iteration points. so every category of update firm consumption of time may be greatly reduces. so although operation, will need more steps. but, can effectively avoid to go to the occurrence of congestion, and improve the performance of the database.suggest four: child
20、inquires the and list box, had better not use at the same time.sometimes in the application of design, through the list box can really improve user input speed and accuracy, but, if foreground application does not have buffer mechanism, you often can cause congestion.as in a order management system,
21、 may need frequent input sales representatives. in order to user input convenience, sales representative often design into a list box. every time need to input, foreground application from the background of all sales representative inquires information (if the application is not involved in the cach
22、e). on one hand, the son of nature, would be speed query slow; second, the list box have growth time operation of the inquiry. the two parties face touch together, may cause the application of improving the running time process query. and the other user queries, such as the system administrator need
23、 to maintain customer information, and cause congestion.so, in the application design, the child inquires the best less. and the child inquires the list box and use at the same time, more need to ban. if you cant avoid it, should be in application realize caching mechanism. that way, the application
24、s need to sales representative information, will from application cache made, not every time to check the database.at the same time, can be in the list box design to search function. when there is a change to the user information, such as the system administrator to join a new sales representatives.
25、 in no again before inquires, because of their application is achieved in the cache data, so not just updated content. at this time, users will need to run to inquires the function, let the foreground application from a database query information again. this kind of design, can increase the list box
26、 and the son of the execution time inquires, effectively avoid congestion.suggest five: in the set when cancel inquires back issues.foreground application is designed, should allow users to a temporary change in idea, cancel the query. such as user inquires the all product information, may feel resp
27、onse time is long, hard to bear. at this time, they will think of cancel inquires the. in this case, the application design need to design a cancel inquires the button. the user can in the process of inquires click this button cancel inquires at any time. meanwhile, in the button affair, need to pay
28、 attention to join a rollback command. let the database server can prompt to records or table to unlock.at the same time to the best lock or query timeout mechanism. this is largely because, sometimes also can cost a lot inquires user host to a large number of resources, and cause client crash. at t
29、his time, to be able to lock the inquires the or overtime mechanisms, namely in inquires after overtime, database server of related objects for automatic unlock. this is also the database administrator need to program developers negotiation of a problem.in addition, explicit database connection to t
30、ake control in the concurrent users, is expected to full load next use application to bear ability test, use the link, each inquires to set use inquires and lock exceeds the overtime, these methods can effectively avoid the lock conflict obstruction. when database administrators found that blocking
31、the symptoms, can from these aspect, looking for solutions.from the above analysis can see, sql server database lock is a double-edged sword. the security database data consistency at the same time, they will give the database caused some negative effect. how do these negative influence to the least
32、, is our database administrators task. in application design, follow the advice above, can effectively solve the problems for the lock blockages, improve the performance of the database. visible, to basically solve congestion problem, need database management personnel and program developers work to
33、gether.中文关于数据库死锁的知识数据库本身提供了锁管理机制,但是从一方面,数据库客户端应用程序的“傀儡”,这主要是由于客户端到服务器的完全控制获得的锁的能力。客户机在请求在查询的查询处理的方法,往往有直接的控制,所以,如果我们的应用程序设计的不够合理,那么出现的数据库死锁现象就很正常了。下面列举一些容易出现锁死的应用程序例子:一、客户端取消查询后没有回滚实务。大多数应用程序查询通常发生的作业。然而,用户通过前台客户端应用程序的后端数据库查询,有时候会取消询问因为各种原因。如果用户打开窗户口查询之后,因为用户发现反映缓慢崩溃或被迫取消查询。但是,当客户端当取消问道,如果不添加回滚事务声明,
34、然后在这个时候,因为用户只有服务器发送了查询请求,因此,后端数据库中涉及的表,所有已添加l锁。因此,即使用户取消查询之后,所有的事务的锁在将继续。在这一点上,如果其他用户需要检查表或用户打开窗口来输入查询的查询条件,提高系统的响应速度时发生堵塞现象。二、客户端没有及时取得所有查询的结果.通常,用户将被发送到服务器的查询后,前台应用程序必须立刻进行提取所有的结果。如果应用程序没有旅行中提取所有的结果,它就会产生问题。只要应用程序没有及时提取所有的结果,锁可能呆在桌子和阻止其他用户。由于应用程序已被提交至服务器将平方语句,应用程序必须提取所有结果。如果应用程序没有遵循原则词(比如因为在那个时候,没
35、有监督配置),不能从根本上解决拥堵。三、查询执行时间过长。一些查询将成本的一个相对较长的时间。至于查询设计不合理或查询设计观察和记录,将使查询的执行时间延长。如果有时需要更新用户记录或删除操作,如果队伍参与着它,你会得到很多的锁。这些锁升级看是否最后锁可以阻止其他的查询。所以通常,不要把长时间运行决策支持搜索和在线事务处理,询问混合在一起。当数据库满足封锁,通常需要检查应用程序提交的sql语句本身,并检查和连接管理,所有的结果进行处理和其他相关的应用程序行为。通常,为了避免冲突的拥塞在锁上,作者提出以下的建议。建议一:完成后提取所有查询结果。一些应用程序为了提高用户查询的响应速度,将有权选择提
36、取需要记录。“智能”看起来很合理,但是,却会导致更大的浪费。因为没有及时的话查询结果提取、锁不能被释放。当别人查询数据,将发生阻塞的。因此,笔者建议在应用程序设计、数据库查询记录来提取时间。通过其他手段,如添加查询条件,或后台的查询时,提高查询效率。同时,在应用程序级别设置合理的缓存,也可以是非常显著提高查询效率。建议二:在事务执行时不要让用户输入内容。尽管在事务的过程性,能让用户参与,为了提高交互性。但是,我们并不推荐使用数据库管理员倾向于这么做。因为如果用户在事务执行期间输入参数,并将扩展事务的执行时间。尽管人们变得更聪明,但是响应速度仍然没有电脑,那么快。因此,在实现用户的参与让这个过程中,将扩展事务的等待时间。所以除非有特殊的需求,而不是在应用程序的执行过程中,让用户输入参数。一些事务的执行必须参数,最好事先提供。如果能够通过中的变量参数如需要进去。建议三:使事务尽可能的简短。数据库管理员应该放一些问题简单化。当一个需要很多的sql语句完成,不妨把任务分解。同时,它分解成一些简短的业务事务。如果数据库产品信息表,它记录编号二百万。现在在一个管理需求,一次性修改其中一个十亿零五十万年的纪录。如果通过改变事务的时间较长。如果涉及到级联更新它,时间会更长。鉴于这种情况,我们可以学习事务简短的话。如果产
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 卖房定金合同范本标题
- 企业策划费合同范本
- 农村水泥房拆除合同范本
- 代理销售类合同范本
- 劳务保姆合同范本
- 会所店面转让合同范本
- 中国银行融资租赁合同范本
- 住宅前期物业合同范本
- 协助中标合同范本
- 卸货物合同范本
- GB∕T 41168-2021 食品包装用塑料与铝箔蒸煮复合膜、袋
- 反兴奋剂知识试题及答案
- 初中八年级上册音乐课件4.2欣赏沃尔塔瓦河(14张)ppt课件
- 部编版语文一年级下册绘本阅读课-优质课件.pptx
- 新人教版九年级全一册物理知识点填空题汇编
- 人教版五年级数学下册每个单元教材分析(共九个单元)
- 办好高水平民办高中的哲学思考-教育文档
- 小学生如何理解句子的含义(课堂PPT)
- 学科分类与代码(管理学)
- PROE拆电极教程
- 实际控制关系账户申报表
评论
0/150
提交评论