Thank you, that&#39;s good news.<br>I forgot to mention I need this also for FDO 3.4.<br><br>Igor<br><br><br><div class="gmail_quote">On Mon, Apr 26, 2010 at 2:37 PM, Badreddine Karoui <span dir="ltr">&lt;<a href="mailto:badreddine.karoui@autodesk.com">badreddine.karoui@autodesk.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Transaction is supported in 3.5:</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><a href="http://svnmirror.osgeo.org/fdo/trunk/Providers/SQLite/Src/Provider/SltCapabilities.h" target="_blank">http://svnmirror.osgeo.org/fdo/trunk/Providers/SQLite/Src/Provider/SltCapabilities.h</a></span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Badreddine</span></p>

<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>] <b>On
Behalf Of </b>Igor Jarm<br>
<b>Sent:</b> Monday, April 26, 2010 7:56 AM<br>
<b>To:</b> <a href="mailto:fdo-users@lists.osgeo.org" target="_blank">fdo-users@lists.osgeo.org</a><br>
<b>Subject:</b> [fdo-users] SQLite provider and transactions/batch inserts/</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<p class="MsoNormal">Hello all!<br>
<br>
I&#39;m using SQLite FDO provider and need fast insert capabilities.<br>
<br>
I had 4 options to test:<br>
- individual inserts<br>
(- transactions - not supported)<br>
(- batch insert - not supported)<br>
- compiled queries (*** see below)<br>
<br>
I expected compiled queries would be comparable to SQLite transactions.<br>
I&#39;m, using code, that looks like this:<br>
<br>
FdoPtr&lt;FdoIInsert&gt; ins =
(FdoIInsert*)conn-&gt;CreateCommand(FdoCommandType_Insert);<br>
while(!done)<br>
{<br>
    FdoPtr&lt;FdoIFeatureReader&gt; fr = ins-&gt;Execute();<br>
    if(enoughExecutesToCommitToDatabase)  //100,1000,...<br>
        ins =
(FdoIInsert*)conn-&gt;CreateCommand(FdoCommandType_Insert);   //make
a new one and release the old one<br>
}<br>
<br>
<br>
These are the results of timing 1000 inserts compared to unoptimized SQLite
implementation:<br>
<br>
- SQLite: 10.83s, 0.0108s per insert<br>
- SQLite, transactions, 1000 per transaction: 0.19s, 0.0002s per insert<br>
- FDO: 9.57s, 0.0096s per insert<br>
- FDO: compiled queries, 1000 per commit, 9.49s, 0.0095s per insert<br>
- FDO: compiled queries, 100 per commit, the same, etc. ...<br>
<br>
Compiled queries are the same as executing individual inserts, .<br>
Of course I could use SQLite directly but I have to keep everything in FDO.<br>
<br>
Am I missing something?<br>
Are there some plans to implement transactions or batch inserts for SQLite FDO
provider?<br>
Or is there some other way to speed up the inserts?<br>
<br>
Thank you.<br>
<br>
Igor Jarm<br>
<br>
<br>
<br>
***<br>
//Insert is special. We attempt to speed up inserts if the caller is cooperating.<br>
//The contract is as follows -- as long as the caller reuses the SltInsert
object,<br>
//he is working with a compiled query and within a single transaction. Whenever<br>
//the command object is freed, the transaction is committed.<br>
class SltInsert : public SltCommand&lt;FdoIInsert&gt;<br>
...</p>

</div></div></div>

</div>


<br>_______________________________________________<br>
fdo-users mailing list<br>
<a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br>
<br></blockquote></div><br>