Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.
SELECT BusinessID
FROM
  tableauxiliary
WHERE
  MBRContains(
        GeomFromText (
            'MULTIPOINT(-6.1928749092968 106.7651250907,-6.1771250907032 106.7808749093)'
            ),
            Latlong)    
  AND MATCH (FullTextSearch) AGAINST ('res*' IN BOOLEAN MODE)
AND Prominent >15 

I want MBRContains restriction to be executed first because it's far more restrictive. But mysql optimizer uses the FullTextSearch first.

I ended up using subquery to force MBRContains to be executed first. I want easier way.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.