On Aug 18, 2008, at 12:21 PM, Thomas Sailer wrote:
>
> The following query, however, takes a long time (almost half a  
> minute):
> select * from mapelements,mapelements_rtree where  
> mapelements_rtree.NELAT>=79000000 and  
> mapelements_rtree.SWLAT<=80000000 and  
> mapelements_rtree.NELON>=79000000 and  
> mapelements_rtree.SWLON<=80000000 and  
> mapelements.ID=mapelements_rtree.ID;


Please try changing the last term as shown below (add a "+" before the  
r-tree ID column):

      mapelements.ID = +mapelements_rtree.ID

Let us know what happens to performance.


D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to