【正文】
序查詢通常發(fā)生的作業(yè)。t let the user input content. Although in the affairs of the process with sex, can let the user participation, in order to improve the interactivity. But, we don39。t take long time running decision support search and online transaction processing inquires the mixed together. When database 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. Suggest a: after the pletion 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 fruit 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 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 don39。 下面列舉一些容易出現(xiàn)鎖死的應用程序例子: 一、客戶端取消查詢后沒有回滾實務。如果應用程序沒有旅行中提取所有的結(jié)果 ,它就會產(chǎn)生問題。這些鎖升級看是否最后鎖可以阻止其他的查詢。當別人查詢數(shù)據(jù) ,將發(fā)生阻塞的。盡管人們變得更聰明 ,但是響應速度仍然沒有電腦 ,那么快。同時 ,它分解成一些簡短的業(yè)務事務。但通過產(chǎn)品類別字段來控制 ,來記錄迭代點。每次需要輸入 ,前臺應用程序從背景的查詢將銷售代表信息 (如果應用程序沒有涉及緩存 )。這樣 ,應用程序需要的銷售代表的信息 ,將從應用程序緩存中創(chuàng)造出來的 ,而不是每次檢查數(shù)據(jù)庫。如果用戶查詢所有產(chǎn)品的信息 ,可能會覺得響應時間長 ,難以忍受。這時 ,就可以鎖定超時工作或查詢機制 ,即在后來的要求加班 ,數(shù)據(jù)庫服務器相關的對象自動解鎖??梢?,要從根本上解決擁堵問題 ,需要數(shù)據(jù)庫管理人員和項目開發(fā)人員一起工作。 從上面的分析可以看到 ,SQL Server 數(shù)據(jù)庫鎖是一把雙刃劍。同時 ,在按鈕事件 ,需要注意加入一個回滾命令。此時 ,用戶將需要運行查詢功能 ,讓前臺應用程序從一個數(shù)據(jù)庫查詢信息。和其他的用戶查詢 ,例如系統(tǒng)管 理員需要維護客戶信息 ,充血。 建議四:子查詢與列表框,最好不要同時使用。 如果涉及到級聯(lián)更新它 ,時間會更長。如果能夠通過中的變量參數(shù)如需要進去。 建議二:在事務執(zhí)行時不要讓用戶輸入內(nèi)容。 建議一: 完成后提取所有查詢結(jié)果 。 三、查詢執(zhí)行時間過長。但是 ,當客戶端當取消問道 ,如果不添加回滾事務聲明 ,然后在這個時候 ,因為用戶只有服務器發(fā)送了查詢請求 ,因此 ,后端數(shù)據(jù) 庫中涉及的表 ,所有已添加 L 鎖。s execution process, reminds the user input parameters. Some affairs of the executive must parameters, 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 plete, mi