MySQL Forums
Forum List  »  GIS

Strange MBRContains results
Posted by: Lukasz Nowak
Date: May 16, 2010 02:39PM

Hi,
I have some problems with MBRContains method.

In my database I have 1mln Point type records in ranges (X - from 0 to 300 and Y from 0 to 300). I want to select records from Polygon (140x140), here is describe:

id: 1
select_type: SIMPLE
table: performance_test
type: ALL
possible_keys: geom
key: NULL
key_len: NULL
ref: NULL
rows: 1000000
Extra: Using where

Ok, but when I want to select records from Polygon 136x136 I get:

id: 1
select_type: SIMPLE
table: performance_test
type: range
possible_keys: geom
key: geom
key_len: 34
ref: NULL
rows: 174053
Extra: Using where


Here is sample sql:

mysql> describe select astext(geom) from performance_test where MBRContains(GeomFromText('POLYGON((0 0, 0 140, 140 140, 140 0, 0 0))'),geom)\G

Why in the first case no spatial index is used?

PS. Sorry form my English :)

Options: ReplyQuote


Subject
Views
Written By
Posted
Strange MBRContains results
3469
May 16, 2010 02:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.