<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</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 class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/8865">https://github.com/OSGeo/gdal/pull/8865</a></p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 29/11/2023 à 02:56, Fengting Chen a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:BYAPR10MB33664395619CE211066350859383A@BYAPR10MB3366.namprd10.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@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;}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;
        mso-ligatures:none;}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;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <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>
            <div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
              <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 class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a><br>
                  <b>Date: </b>Tuesday, November 28, 2023 at 6:36 PM<br>
                  <b>To: </b>Fengting Chen
                  <a class="moz-txt-link-rfc2396E" href="mailto:fengting.chen@oracle.com"><fengting.chen@oracle.com></a>,
                  <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
                  <a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev@lists.osgeo.org"><gdal-dev@lists.osgeo.org></a><br>
                  <b>Subject: </b>[External] : Re: [gdal-dev] GDAL
                  driver Open() calls</span><span
style="font-size:12.0pt;color:black;mso-ligatures:none"><o:p></o:p></span></p>
            </div>
            <p>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>
                  <o:p></o:p></span></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"
              moz-do-not-send="true" class="moz-txt-link-freetext">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$"
              moz-do-not-send="true">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$"
            moz-do-not-send="true">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>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>