Hello!

В сообщении от Monday 18 August 2008 20:21:04 Thomas Sailer написал(а):
> The following query is very quick, it returns 20 rows within a small
> fraction of a second: select * from mapelements_rtree where NELAT>=79000000
> and SWLAT<=80000000 and NELON>=79000000 and SWLON<=80000000;
>
> 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;

Try the query:

select * from mapelements where ID in (select ID from mapelements_rtree where 
NELAT>=79000000 and SWLAT<=80000000 and NELON>=79000000 and SWLON<=80000000);


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

Reply via email to