MySQL Forums
Forum List  »  GIS

trying to use spatial index for fast retrieving
Posted by: Jo Ha
Date: May 15, 2006 03:45AM

Hi

I have intervals on x axis (a,b) and i'm trying to store them in Linestring(a 0 , b 0)
i create spatial index on the right column and inserted a few hundrends of intervals(a,b)

i try to find out if point $p lies inside one of them by using the following:

$p=78 // (78,0)
SELECT AsText(interval) FROM xaxis WHERE Contains(interval,GeomFromText('POINT(".$p." 0)'))

when i look at EXPLAIN i see that although there is a spatial index on 'interval' column it is not used.

also index cardinality is shown to be 1... like i have only one unique value...this is odd...

someone knows maybe what's wrong with what i'm doing?

thank you

Options: ReplyQuote


Subject
Views
Written By
Posted
trying to use spatial index for fast retrieving
3646
May 15, 2006 03:45AM


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.