MySQL Forums
Forum List  »  GIS

How do you handle unknown POINT values in MySQL?
Posted by: Peter Barney
Date: March 29, 2018 04:26PM

I posted this in the InnoDB forum, but I think this is probably a better place for my question.

MySQL 5.7 introduced Spatial Indexes on POINT columns. Apparently, you cannot have NULL values in a spatial index. At the same time, you cannot use a DEFAULT for POINT columns.

So how do you handle the case where the value for POINT is unknown?

I geocode every address in my database, but if the end user doesn't supply an address, what should I put there?

In another question, someone suggested placing them at the North Pole POINT(0.0000,90.0000) but this takes 25 bytes for each unknown address.

Is there a way to resolve this?

FYI: I am not a DBA.

Options: ReplyQuote


Subject
Views
Written By
Posted
How do you handle unknown POINT values in MySQL?
1588
March 29, 2018 04:26PM


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.