<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Even<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks for your response and its great to get confirmation that I wasn’t doing something wrong or missing something in the docs.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I can definitely run multiple processes that write an index on different tables in a single FileGDB at the same time and it seems “ok” – ie I haven’t seen any errors.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But my tests definitely show you cannot write multiple indexes concurrently on the same table which seems to fit with the issue of the .gdbindexes file you mention.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks again<o:p></o:p></p>
<p class="MsoNormal"><br>
Tim<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<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 style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Sent:</b> 06 February 2023 12:01<br>
<b>To:</b> Tim Martin <Tim.Martin@os.uk>; gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [gdal-dev] Writing concurrent indexes to a FileGDB<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p class="MsoNormal" style="line-height:12.0pt;background:#FFEB9C"><b><span style="font-size:10.0pt;color:#9C6500">External Email:</span></b><span style="font-size:10.0pt;color:black"> Take care with attachments & links.</span><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p>Tim,<o:p></o:p></p>
<p>Currently there is no guarantee that concurrent updates to the same FileGDB database, either from the same process or from different process, are safe, as no locks are set, and the driver might cache in memory things assuming that nothing else changes them
 behind its back.<o:p></o:p></p>
<p>That said, I *believe* (but definitely doesn't guarantee) that you could create indexes on different layers/tables of a FileGDB from concurrent ogrinfo instances. It is probably not safe however to create indexes on different columns of the same table concurrently,
 because the .gdbindexes file might be written concurrently<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 06/02/2023 à 12:03, Tim Martin 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 GDAL Devs<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I posted this question on GIS Stack Exchange and someone recommended I contact this group (<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgis.stackexchange.com%2Fquestions%2F451331%2Fadding-multiple-attribute-indexes-to-filegdb-using-ogrinfo%2F451336%23451336&data=05%7C01%7CTim.Martin%40os.uk%7C4ab8822f4294480dbbbf08db0839dd47%7C7988742dc5434b9a87a910a7b354d289%7C0%7C0%7C638112816847475257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QQPsbRNKS9SnnDeMJXYvq07Uy%2Fe2h4IGt%2Fzd53hRApQ%3D&reserved=0">https://gis.stackexchange.com/questions/451331/adding-multiple-attribute-indexes-to-filegdb-using-ogrinfo/451336#451336</a>)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have the unfortunate task of creating some very large FileGDB and need to add multiple indexes to several attributes on each Feature Type.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I saw that the OpenFileGDB driver under Dev is now able to Write, so am using that version, which by my testing is 3 or 4 times faster than the original FielGDB driver – which is amazing!!!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Now I need to index these columns and it has taken 26hrs to add 5 attribute indexes due to the sheer number of features (200mill or so).<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">So am wondering if there is a way to use ogrinfo and write indexes concurrently?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">With thanks Tim<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><br>
<br>
This email and any attachments are intended only for the intended recipient and may contain sensitive information. If you are not the intended recipient, please immediately delete this email and inform the sender.<br>
<br>
OS email communications may be monitored to ensure the secure and effective operation of our systems and for other lawful purposes. Subject to contract: No rights are to be derived from any proposal contained in this email until a written agreement containing
 all necessary terms is executed between the relevant parties.<br>
<br>
Thank you for your cooperation.<br>
<br>
Ordnance Survey Limited (Company Registration number 09121572)<br>
Registered Office: Explorer House<br>
Adanac Drive<br>
Southampton SO16 0AS<br>
Tel: 03456 050505<br>
<a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.os.uk%2F&data=05%7C01%7CTim.Martin%40os.uk%7C4ab8822f4294480dbbbf08db0839dd47%7C7988742dc5434b9a87a910a7b354d289%7C0%7C0%7C638112816847475257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ep6unLvZ8F7RJ8uIq2rSLXt4X0WlcOdZnKsR259FngQ%3D&reserved=0">http://www.os.uk</a>
<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">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=05%7C01%7CTim.Martin%40os.uk%7C4ab8822f4294480dbbbf08db0839dd47%7C7988742dc5434b9a87a910a7b354d289%7C0%7C0%7C638112816847631480%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=slNtsriM%2Bd%2FIuMOOZlROtgj4LOiELXh3QHiAsWdNBU4%3D&reserved=0">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://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.spatialys.com%2F&data=05%7C01%7CTim.Martin%40os.uk%7C4ab8822f4294480dbbbf08db0839dd47%7C7988742dc5434b9a87a910a7b354d289%7C0%7C0%7C638112816847631480%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AmRBIbuSyjqnkz3pyZ3V0qwtZFxjp2SV1xZcWJ4RJtY%3D&reserved=0">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>
<br>
<br>
This email and any attachments are intended only for the intended recipient and may contain sensitive information. If you are not the intended recipient, please immediately delete this email and inform the sender.<br>
<br>
OS email communications may be monitored to ensure the secure and effective operation of our systems and for other lawful purposes. Subject to contract: No rights are to be derived from any proposal contained in this email until a written agreement containing
 all necessary terms is executed between the relevant parties.<br>
<br>
Thank you for your cooperation.<br>
<br>
Ordnance Survey Limited (Company Registration number 09121572)<br>
Registered Office: Explorer House<br>
Adanac Drive<br>
Southampton SO16 0AS<br>
Tel: 03456 050505<br>
<a href="http://www.os.uk">http://www.os.uk</a>
</body>
</html>