[fdo-users] Re: SQLite provider and transactions/batch inserts/

Igor Jarm igor at sl-king.com
Wed Apr 28 18:09:30 EDT 2010


Thank you very much, Romy!

What you suggested about the properties did the trick. Now FDO inserts are
about 2 times faster than unoptimized SQLite inserts.

Thanks again to all of you!

Best regards,
Igor


On Tue, Apr 27, 2010 at 3:14 PM, Romica Dascalescu <
Romica.Dascalescu at autodesk.com> wrote:

> Hi Igor,
>
> You should not clear the  property values collection, you should just set
> the new values to the property value and set null for null properties.
> Also the slow insert can be because 3.4 provider uses file journal, 3.5
> provider uses memory journal.
>
> Regards,
> Romy
> ________________________________________
> From: fdo-users-bounces at lists.osgeo.org [fdo-users-bounces at lists.osgeo.org]
> On Behalf Of Jackie Ng [jumpinjackie at gmail.com]
> Sent: Tuesday, April 27, 2010 5:53 AM
> To: fdo-users at lists.osgeo.org
> Subject: [fdo-users] Re: SQLite provider and transactions/batch inserts/
>
> Hi Igor,
>
> I use the following bulk insert logic for FDO Toolbox. It is based on the
> SQLiteConverter implementation, and has no adverse performance effects
> (that
> I know of) for other providers:
>
> Create the fdo insert command *ONCE*
> Obtain a pointer/reference to its PropertyValues collection
>
> For each feature to be inserted:
> - Clear this collection
> - Load up with property values to be inserted
> - Execute the insert command
> - Repeat
>
> The key here is creating the insert command once, and reusing the property
> value collection repeatedly.
>
> Since you're working with C++ directly, you might as well look at the
> SQLiteConverter source as it does what I just described.
>
> - Jackie
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/SQLite-provider-and-transactions-batch-inserts-tp4962263p4967766.html
> Sent from the FDO Users mailing list archive at Nabble.com.
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
>
> http://lists.osgeo.org/mailman/listinfo/fdo-users_______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20100429/90ca1eef/attachment.html


More information about the fdo-users mailing list