<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>From the bug report:</p>
<p>"QGIS is operating a 'full table scan' for MSSQL connections <b>where
no geometry_columns table exists</b>." which triggers the
situation. That's not smart and should be fixed.<br>
</p>
<p>However until that happens, an obvious work-around would be to
create and populate a geometry_columns table. So if you don't have
a geometry_columns table in the database, create one and populate
it with the information about your spatial tables<b>. </b>This
can be done automatically with a stored procedure outside the
scope of QGIS.</p>
<p>I <i>think</i> I have such procedure lurking somewhere in my
dungeon of a backup system. Send me a mail if you're interested.
<br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Kind regards
Bo Victor Thomsen</pre>
<div class="moz-cite-prefix">Den 20-09-2021 kl. 11:44 skrev PIERRE
Sylvain:<br>
</div>
<blockquote type="cite"
cite="mid:PR1P264MB2046C7434FC5882C88F7AB329CA09@PR1P264MB2046.FRAP264.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
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;
mso-fareast-language:EN-US;}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]-->
<div class="WordSection1">
<p class="MsoNormal">Hi ,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In want to connect with QGIS to a MSSQL
geodabase. But when connecting to this DB it generates
multiple (000s) processes on database server.<o:p></o:p></p>
<p class="MsoNormal">DB contains 10 schemas with several
huundred tables<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Realy similar to this issue <a
href="https://github.com/qgis/QGIS/issues/31101"
moz-do-not-send="true">
https://github.com/qgis/QGIS/issues/31101#</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is there any workaround for this ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable"
style="width:483.45pt;margin-left:-1.5pt" width="0"
cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr style="height:115.45pt">
<td style="width:98.5pt;padding:0cm 0cm 0cm
0cm;height:115.45pt" width="134" valign="top">
<p class="MsoNormal"
style="margin-left:21.3pt;text-indent:-21.3pt;line-height:115%">
<span style="mso-fareast-language:FR"><img
style="width:1.075in;height:1.4916in"
id="Image_x0020_2"
src="cid:part2.F9FE9202.831D36E1@gmail.com"
class="" width="103" height="143" border="0"></span><b><span
style="font-size:14.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#CC0066;mso-fareast-language:FR"
lang="EN-US"><o:p></o:p></span></b></p>
</td>
<td style="width:380.45pt;padding:1.5pt 1.5pt 1.5pt
1.5pt;height:115.45pt" width="510">
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:21.3pt;text-indent:-21.3pt;line-height:115%"><span
style="font-size:13.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#003399;mso-fareast-language:FR"
lang="EN-US">Sylvain PIERRE</span><b><span
style="line-height:115%;font-family:"Verdana",sans-serif;color:#003399;mso-fareast-language:FR"
lang="EN-US"><o:p></o:p></span></b></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR"
lang="EN-US">Chef de projet système d’information<o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR"
lang="EN-US">Direction des Systèmes d’Information et
du Développement Numérique<o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Service
Projets et Ingénierie Numérique<o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><b><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Collectivité
européenne d’Alsace<o:p></o:p></span></b></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR">Tél
: 03 88 76 68 88<o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:black;mso-fareast-language:FR"><a
href="mailto:sylvain.pierre@alsace.eu"
moz-do-not-send="true"><span style="color:blue">sylvain.pierre@alsace.eu</span></a><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><a
href="http://www.alsace.eu" moz-do-not-send="true"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:blue;mso-fareast-language:FR"
lang="EN-US">www.alsace.eu</span></a><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"
style="mso-margin-top-alt:1.0pt;margin-right:0cm;margin-bottom:1.0pt;margin-left:0cm;line-height:115%"><a
href="http://www.facebook.com/toutelalsace"
moz-do-not-send="true"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img
style="width:.15in;height:.1583in"
id="Image_x0020_4"
src="cid:part5.43D5B79E.EC842E8D@gmail.com"
alt="facebook" class="" width="14" height="15"
border="0"></span></a><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"
lang="EN-US"> </span><a
href="http://www.twitter.com/toutelalsace"
moz-do-not-send="true"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img
style="width:.1583in;height:.1583in"
id="Image_x0020_7"
src="cid:part7.E41A5582.420890FC@gmail.com"
alt="twitter" class="" width="15" height="15"
border="0"></span></a><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;mso-fareast-language:FR"
lang="EN-US"> </span><a
href="http://www.instagram.com/toutelalsace"
moz-do-not-send="true"><span
style="font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:windowtext;mso-fareast-language:FR;text-decoration:none"><img
style="width:.1583in;height:.1583in"
id="Image_x0020_8"
src="cid:part9.672F0675.43F2A023@gmail.com"
alt="insta" class="" width="15" height="15"
border="0"></span></a><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
</blockquote>
</body>
</html>