Hi Thomas, By using the good envelope query, in my performance test your MVRTreeMap is not far from JTS STRTree.
In my sql request (count roads inside several areas): > select AREA.NAME,AREA.ID, COUNT(ROAD.ID) roadcount from AREA, ROAD WHERE > AREA.the_geom && ROAD.the_geom GROUP BY AREA.NAME,AREA.ID ORDER BY > AREA.NAME,AREA.ID; Without index, it takes ~9 s . With index and Envelope union it take more than 100s. With index and without envelope union it takes ~1s. I guess that Noel have done the same thing that you have done for interval numeric search. I will wrote a test case on that part. Currently I have the following StackTrace: 07-11 09:06:00 database: flush > java.lang.IllegalStateException: Corrupt page count -1 [1.3.172] > at > org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:632) > at org.h2.mvstore.MVStore.applyFreedPages(MVStore.java:1004) > at org.h2.mvstore.MVStore.store(MVStore.java:871) > at org.h2.mvstore.MVStore.store(MVStore.java:779) > at org.h2.mvstore.MVStore.compact(MVStore.java:1197) > at org.h2.mvstore.db.MVTableEngine$Store.store(MVTableEngine.java:132) > at org.h2.engine.Database.flush(Database.java:1818) > at org.h2.store.WriterThread.run(WriterThread.java:87) > at java.lang.Thread.run(Thread.java:662) > I guess it is because I use directly store.openMap with main MVStore here: https://github.com/nicolas-f/h2database/blob/patch-merge/h2/src/main/org/h2/index/SpatialTreeIndex.java#L95 I will do the same thing as you, using Transaction, hope that it will fix corrupt page issue: https://github.com/nicolas-f/h2database/blob/patch-merge/h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java#L69 Regards, -Nicolas Fortin GIS Workshop IRSTV FR CNRS 2488 Le mercredi 10 juillet 2013 21:45:47 UTC+2, Thomas Mueller a écrit : > > Hi, > > > I have performance issues with the spatial index > > I don't think it's because of your change. Please note some features are > still missing or are not optimised at all. If you could post a test case > that would be great, I will then try to find the problem. > > Regards, > Thomas > > > On Wed, Jul 10, 2013 at 8:54 AM, Nicolas Fortin (OrbisGIS) < > [email protected] <javascript:>> wrote: > >> Hi Thomas, >> >> Ok nice, way better than a random test case. I have performance issues >> with the spatial index, maybe my fix introduce processing overhead. I will >> try to use your profiler, or the IntellliJ one.. >> >> Regards, >> >> -Nicolas Fortin >> GIS Workshop >> IRSTV FR CNRS 2488 >> >> Le lundi 8 juillet 2013 20:35:58 UTC+2, Thomas Mueller a écrit : >> >>> Hi, >>> >>> By the way, I now have a reproducible test case for the bug with the >>> MVRTreeMap (the one you fixed in your version). >>> >>> Regards, >>> Thomas >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
