<html 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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@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:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-ligatures:standardcontextual;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">This doesn’t seem to fix the problem. How do I print out the stack trace in the driver?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Even Rouault <even.rouault@spatialys.com><br>
<b>Date: </b>Wednesday, November 29, 2023 at 5:54 AM<br>
</span>Hi,<o:p></o:p></p>
<p>The logs didn't directly answer my question as they lacked the chain of calls, but I believe I figured out the reason. Please try
<a href="https://urldefense.com/v3/__https:/github.com/OSGeo/gdal/pull/8865__;!!ACWV5N9M2RV99hQ!MF9SjOfGKBc2ARm4bfNzMX-sGw7CXys2OohWuuKXhMG31EkrQNqZkn6xm2MnoCqt3grzKRb9rPrV6jn-lmQqxHx1bEOa$">
https://github.com/OSGeo/gdal/pull/8865</a><o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 29/11/2023 à 02:56, Fengting Chen a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">The attached are two output logs with debug on. You can see that the output from GDAL 3.7 has two extra queries at the beginning. These queries only happen when the eAccess is GA_ReadOnly. The logs are generated with the same command parameters
 to gdal_translate. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div id="mail-editor-reference-message-container">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Even Rouault <a href="mailto:even.rouault@spatialys.com">
<even.rouault@spatialys.com></a><br>
<b>Date: </b>Tuesday, November 28, 2023 at 6:36 PM<br>
</span>Hi,<o:p></o:p></p>
<p>Please share the stack trace (on a debug build) of both instances where GDALOpen() is called<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 28/11/2023 à 23:40, Fengting Chen via gdal-dev a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I noticed from the GeoRaster driver that in GDAL 3.6 and 3.7 (maybe 3.8 too),  there are two GDALOpen() calls on the driver with GDALOpenInfo eAccess as GA_ReadOnly, even when the GeoRaster is the output format in gdal_translate command.
 There are no such calls in GDAL 3.4. I am wondering if these invocations of Open() with eAccess as GA_ReadOnly are necessary when the driver is the output driver. This has caused performance issue for the GeoRaster driver when a user is trying to load the
 data into Oracle database because it has two unnecessary reads from the database.  If these Open() calls are unavoidable, how to differentiate the calls whether it is as input or as output in the gdal_translate command?<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"><span style="mso-ligatures:none"><br>
<br>
<br>
</span><o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!IqVgHqcg5DBb3fu5ZpXizGqYnezdKvCzFALf06Gt-Vs7RiPPCXFACcefd_slweWtNCqHy-G-OsmoPt9XZqR4DOWs5UiD$">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!IqVgHqcg5DBb3fu5ZpXizGqYnezdKvCzFALf06Gt-Vs7RiPPCXFACcefd_slweWtNCqHy-G-OsmoPt9XZqR4DFVEpZ99$">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</div>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!MF9SjOfGKBc2ARm4bfNzMX-sGw7CXys2OohWuuKXhMG31EkrQNqZkn6xm2MnoCqt3grzKRb9rPrV6jn-lmQqxN5wEZnr$">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</div>
</div>
</body>
</html>