Let's assume you have a huge PostGis spatial table (using Postgresql 9.2, postgis 1.5) :
BIGTABLE ( p Point, someData varchar )
which contains millions of records. Each record has been created with a Point and each point has an associated varchar data (let's call it the useful information).
Now, let's say there is another spatial table from which you also can get a Point field :
SOMESEARCHPOINTS ( ... , p Point , ...)
For a given set of points from the SOMESEARCHPOINTS table (which are retrieved from a subquery on this table), I want to find the corresponding "someData" varchar using a JOIN.
SELECT * FROM SOMESEARCHPOINTS sp LEFT JOIN BIGTABLE b ON ( XXXXXXXXXXX )
The XXXXXXXXXXX being the join condition.
The question is : without modifying the current schema (meaning without changing the geometry type), is it possible to have an efficient XXXXXXXXXXX join condtion ? If not, what is the proper way to do that ?