I've tried stepping into the rtree code, and the right code paths all seem to get hit. Nevertheless, once the transaction completes, I open the table again, and the freshly inserted records do not appear in the idx_elec_lv_cable_geometry_rowid table. And this is especially strange, since I debug-step-over the code that performs the insertion into idx_elec_lv_cable_geometry_rowid, and it all appears to run without a hitch.
-----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: 05 July 2011 03:20 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] False negatives from RTree On Tue, Jul 5, 2011 at 8:55 AM, Ben Harper <b...@imqs.co.za> wrote: > Hi, > Has anybody ever seen anomalous behaviour on an R*Tree. Specifically, false > negatives? > I'm using Spatialite 2.4.0 RC. > > What I end up with is a table into which I can insert new geometry, but > that geometry does not get retrieved by an appropriate RTree search. > Indeed, even a search which spans all of my geometry does not yield these > newly inserted records. > > For example: > select count(rowid) from idx_elec_lv_cable_geometry where xmax >= -9e30 AND > xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; > 17235 > > select (count*) from elec_lv_cable; > 17241 > > So I'm missing 6 records there. > What does the following show: SELECT * FROM idx_elec_lv_cable_geometry EXCEPT SELECT * FROM idx_elec_lv_cable_geometry where xmax >= -9e30 AND xmin <= 9e30 AND ymax >= -9e90 AND ymin <= 9e30; That query should show just the 6 records that are missing. > > I can't discern anything strange about the data, or my methods. > I'm curious to know whether anybody has seen this kind of thing before? > > Thanks, > Ben > > ps. This message is cross-posted to the Spatialite mailing list. > _______________________________________________ > sqlite-users mailing list > email@example.com > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list firstname.lastname@example.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list email@example.com http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users