<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Le 20/07/2025 à 13:27, Michael Smith
      via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:6B81054F-06B2-4FB7-B557-3410AEA6C1BC@gmail.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:"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:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal">Using GDAL 3.11.3:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a dataset Geometry: Point Feature
          Count: 15546949 in parquet format (written using gdal from
          oracle source). When doing a spatial query using the
          geoparquet driver, I see it accessing almost all the row
          groups of the dataset (PARQUET: 155/156 row groups selected)
          with a spatial filter fetching 12000 of the 15M points and it
          takes 0m18.794s. When accessing via ADBC and libduckdb, it
          takes 0m7.102s (but it also uses 7x CPU and about 10x memory
          (from looking at top). <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I then rewrote the dataset using -lco
          SORT_BY_BBOX=YES. Then parquet driver accesses PARQUET: 9/238
          row groups selected, and the time drops to 0m1.412s. Using
          ADBC and libduckdb, the performance doesn’t change. <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">For proper performance with gdal, is
          SORT_BY_BBOX=YES always needed?</p>
      </div>
    </blockquote>
    yes, unless your features are already spatially sorted. It is a bit
    strange that you don't see improvements with the ADBC driver as it
    does push the spatial filter bbox in the SQL request, so that's
    perhaps a limitation on how duckdb itself deals with such filters<br>
    <blockquote type="cite"
      cite="mid:6B81054F-06B2-4FB7-B557-3410AEA6C1BC@gmail.com">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <div>
            <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif;mso-ligatures:none">-- <o:p></o:p></span></p>
          </div>
          <div>
            <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif;mso-ligatures:none">Michael
                Smith<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif;mso-ligatures:none">RSGIS
                Center – ERDC CRREL NH<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-family:"Aptos",sans-serif;mso-ligatures:none">US
                Army Corps</span><o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </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>