Re: Is dirty read enough ?
Posted in 2003
> THIS IS A MESSAGE IN 'MIME' FORMAT. Your mail reader does not support MIME. > Some parts of this will be readable as plain text. > To see the rest, you will need to upgrade your mail reader. --PART.BOUNDARY.2960.4671.p057.1056372883.3930 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-ID: <2960_4671_1056372883_570@inet3-p057> ----- Original Message ----- From: Xiaofeng Chen <xchen@boco.com.cn> At: 6/23 6:58 > Hi, everyone , Hi, > Here I encounter a problem, in our system some tables were accessed > by many clients at the same time. In order to increase > concurrence and prevent influence with each other, we add "set lock mode > to wait" and "set isolation to dirty read" in our client code, > and in server side, we change the lock mode from page to row for the > tables , fragments the tables for distributing read/write operations, > add detached indexs instead of non-detached for tables. > But, I still wonder if it's enough, can it prevent system locks for > the index/table which will affect our clients? What is a 'system' lock? > If IDS wants to adjust the indexes according to data insertion, does it > affect the whole table?, and if it dose, how long will it take ? When the BTree Cleaner threads need to realance the tree and/or merge empty and sparse nodes due to deletes this is done by locking only the affected nodes and these locks are transient lasting a fraction of a second. Your SET LOCK MODE TO WAIT is sufficient to avoid any problems this may cause. Art S. Kagel > > Any comments are appreciated. > Michael. --PART.BOUNDARY.2960.4671.p057.1056372883.3930 Content-Type: application/octet-stream; name="13536152.htm" Content-Transfer-Encoding: 7bit Content-Disposition: ATTACHMENT; filename="13536152.htm" Content-ID: <2960_4671_1056372883_571@inet3-p057> <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="cid:filelist.xml@01C339B6.E70E21C0"> <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:ApplyBreakingRules/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:SimSun; mso-font-kerning:1.0pt;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} span.EmailStyle17 {mso-style-type:personal-compose; mso-style-noshow:yes; mso-ansi-font-size:9.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-fareast-font-family:SimSun; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} span.GramE {mso-style-name:""; mso-gram-e:yes;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> </head> <body lang=ZH-CN link=blue vlink=purple style='tab-interval:21.0pt;text-justify-trim: punctuation'> <div class=Section1 style='layout-grid:15.6pt'> <p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size: 9.0pt;mso-bidi-font-size:10.0pt;font-family:Arial'>Hi, <span class=GramE>everyone ,</span> <o:p></o:p></span></font></p> <p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size: 9.0pt;mso-bidi-font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size: 9.0pt;mso-bidi-font-size:10.0pt;font-family:Arial'><span style='mso-spacerun:yes'> </span>Here I encounter a problem, in our system some tables were accessed by many clients at the same time. In order to increase<o:p></o:p></span></font></p> <p class=MsoNormal><span class=GramE><font size=1 face=Arial><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:10.0pt;font-family:Arial'>concurrence</span></font></span><font size=1 face=Arial><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size: 10.0pt;font-family:Arial'> and prevent influence with each other, we add “set lock mode to wait” and “set isolation to dirty read” in our client code, <o:p></o:p></span></font></p> <p class=MsoNormal><span class=GramE><font size=1 face=Arial><span lang=EN-US style='font-size:9.0pt;mso-bidi-