I'm developing an electron app that uses spatialite.
I did a simple test on a spatialite table with about 52000 polygons. (can't tell how many vertices...)
Running the following query in spatialite_gui takes about 0.5 seconds. Running the same query through electron app takes about 3 seconds.
SQL: SELECT field1 FROM table WHERE ST_Intersects(Geometry, ST_GeomFromText('POINT(x y)', 4326));
Yes there is an spatial index on spatialite.
Does spatialit_gui loads the full database into memory? Maybe that's why is much faster. Any ideas about how to improve performance on electron app? Thanks.