Thanks for the quick responses, folks. Actually, I solved it minutes after
I posted my question, and tried to reply to my own question but it appears 
that that message never showed up.

The way to do this is NOT to do a join. What I used was a sub-select:

Select * from Streets Where obj Within (
  Select obj from States Where name="Colorado") Into MyStreets NoSelect

This is relatively quick, but the other fast way if you're using MapBasic
is to get the state polygon into an object variable first and then use it
directly in the SQL like so:

Select * from Streets Where obj Within objState into Mystreets NoSelect


> ----- Original Message ----- 
> From: "Bill Thoen" <[EMAIL PROTECTED]>
> To: "MapInfo List" <[email protected]>
> Sent: Wednesday, June 14, 2006 12:03 AM
> Subject: [MI-L] Performance of Large Tables and Spatial Selections
> 
> 
> > I've got a large table of streets (the *.map file is a little over 1 GB)
> > and when I display it over a table of state polygons and select all
> > streets within a polygon by using a click with the Boundary Select tool,
> > it does this in a few seconds. But when I try to do this with MapBasic
> > via a selection like "Select streets.street_name from streets, states
> > where streets.obj within states.obj and states.name = "Colorado" into
> > MyStreets noselect" it's taking EONS to do this. Anyone know how I can
> > get mapbasic to select streets within boundaries, and do it before I
> > crumble into dust?
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to