Sorry,
I missed the other sections under http://www.sqlite.org/threadsafe.html , sorry.
You can call PRAGMA compile_options; to find these information.
(http://www.sqlite.org/pragma.html#pragma_compile_options )
I did not investigate the performance factor. If you provide some test data and
scenarios, I could run some tests with my modified version and the origin one.
Ideas for speeding up? Not really, sorry.
Next to second dialect, we also need another DataStoreFactory. And because of
the special dependencies (sqlite-jdbc-spatialite) in the SpatiaLite Plugin it
becomes complicates to have both versions in one plugin.
Regards,
Robin
Von: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] Im Auftrag von Andrea
Aime
Gesendet: Freitag, 9. August 2013 15:44
An: Robin Pradel; Geotools-Devel list
Betreff: Re: [Geotools-devel] Spatialite store scalability
On Fri, Aug 9, 2013 at 3:32 PM, Robin Pradel <r...@ivu.de<mailto:r...@ivu.de>>
wrote:
Hi,
the parameter you found is used while compiling the sqlite.dll. There is no way
to change it on connect time through the driver. Because of some other issues I
decided to compile my own sqlite.dll and force the xerial driver to use my one
via the system properties org.sqlite.lib.path and
org.sqlite.lib.name<http://org.sqlite.lib.name> .
Compiling is not so difficult because of http://www.sqlite.org/amalgamation.html
This does not match what I've seen in this page:
http://www.sqlite.org/threadsafe.html
In particular, see "Run-time selection of threading mode".
Anyways, do you know any way to check which runtime mode was using when
compiling a given sqlite installation (I'm running stock sqlite, and often I
won't be allowed to use a custom built one anyways).
Anyways, did you get a scalability improvement by recompiling the library?
I've also noticed a disappointing performance in the single threaded case,
loading data from spatialite seems to be something like 3 times slower than
loading it from a shapefile (extracting a small dataset out of the Texas road
networks, 3 million features), with both having a spatial index.
Any idea what could be done to speed it up?
Furthermore I use a newer spatialite (libspatialite-4.dll) which comes with
built-in initialization for the srid-table and some other stuff. Because of
some changes
(https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0 ) I
had to create (derive) a modified SpatiaLiteDialect and -DataStoreFactory. My
final constellation is not as straight forward as the current public one
because I am using (have to do so ;-) ) the non-spatial xerial driver, where is
no enableSpatiaLite() in SQLiteConfig. That means I call some stuff like SELECT
load_extension(' SPATIALITE_LIB ') in the modified SpatiaLiteDataStoreFactory.
I believe we'll need a configurable dialect, or two different dialect classes,
since spatialite 4 won't be part of the
distributions used for server side linux work for a few years (they are rather
conservative in their selection of packages)
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
First response by Robin (Sorry, I missed sending the first response also to
mailing list, but here it is):
Hi,
the parameter you found is used while compiling the sqlite.dll. There is no way
to change it on connect time through the driver. Because of some other issues I
decided to compile my own sqlite.dll and force the xerial driver to use my one
via the system properties org.sqlite.lib.path and org.sqlite.lib.name .
Compiling is not so difficult because of http://www.sqlite.org/amalgamation.html
I did it on this way:
x86_64-w64-mingw32-gcc.exe -shared -DWIN64 -DNDEBUG -D_WINDOWS -D_USRDLL
-DNO_TCL -D_CRT_SECURE_NO_DEPRECATE -DTHREADSAFE=1 -DTEMP_STORE=1 -m64 -I.
shell.c sqlite3.c -o libsqlite3-0.dll -Wl,--out-implib,libsqlite3-0.a
See also http://www.sqlite.org/howtocompile.html and
http://www.sqlite.org/compile.html
Furthermore I use a newer spatialite (libspatialite-4.dll) which comes with
built-in initialization for the srid-table and some other stuff. Because of
some changes
(https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0 ) I
had to create (derive) a modified SpatiaLiteDialect and -DataStoreFactory. My
final constellation is not as straight forward as the current public one
because I am using (have to do so ;-) ) the non-spatial xerial driver, where is
no enableSpatiaLite() in SQLiteConfig. That means I call some stuff like SELECT
load_extension(' SPATIALITE_LIB ') in the modified SpatiaLiteDataStoreFactory.
Best regards,
Robin
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel