<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I have system_maxlocks set to 50.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I have a query which is going to insert an estimated 3132 pages into a table. Actual is
<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Why isn&#8217;t it initiating with a lock at table level? It takes an IX lock at table level but then starts locking at page level before the inevitable escalation. And thus filling my errlog with lock escalation messages.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">8443 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]: Mon Dec&nbsp; 4 12:41:17 2017 E_DM9063_LK_TABLE_MAXLOCKS&nbsp;&nbsp;&nbsp; Current logical lock count ( 51 ) on resource lb in database bowtest exceeds the specified maximum ( 50 ). Escalating to table level lock.<o:p></o:p></p>
<p class="MsoNormal">METRO_NDPH_OX_AC_U::[42013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , 4437&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;,&nbsp; 00007fe95b4b1580, dm0p.c:28443&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]: PQuery:&nbsp; INSERT INTO lb ( usubjid, lbtestcd, lbtest, lbcat, lborres, lborresu, lbstresc, lbstresn, lbstresu, lbdtc, lbendtc, appttype_id, apptnum
 ) SELECT 'SR' &#43; varchar(a.pt_id), 'WBC', 'White blood cells', 'HEMATOLOGY', b.white, '1000/uL x 100', b.white / 100, b.white / 100, '1000/uL', date_trunc('day', a.datetime), date_trunc('day', a.datetime), a.appttype_id, a.apptnum FROM blood b join appt a on
 b.appt_id = a.appt_id WHERE b.white is not null<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Martin Bowes<o:p></o:p></p>
</div>
</body>
</html>