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

Romica Dascalescu Romica.Dascalescu at autodesk.com
Tue Apr 27 09:14:20 EDT 2010


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


More information about the fdo-users mailing list