The function may alter the execution plan: For the following SQL request:
> select b.id from DEP a,DEP b where a.id = 59 and > ST_Intersects(a.the_geom,b.the_geom) and a.ID!=b.ID > Explain should be SELECT > B.ID > FROM PUBLIC.DEP A > /* PUBLIC.PRIMARY_KEY_1: ID = 59 */ > /* WHERE A.ID = 59 > */ > INNER JOIN PUBLIC.DEP B > /* PUBLIC.PRIMARY_KEY_1: ID IN (BB_INTERSECTS(B,'THE_GEOM', > A.the_geom)) */ > ON 1=1 > WHERE (A.ID <> B.ID) > AND (PUBLIC.ST_INTERSECTS(A.THE_GEOM, B.THE_GEOM) > AND ((A.ID = 59) Another example: For the following SQL request: > select b.id from DEP a,DEP b where a.id = 59 AND NOT > ST_Intersects(a.the_geom,b.the_geom) and a.ID!=b.ID > Explain should be SELECT > B.ID > FROM PUBLIC.DEP A > /* PUBLIC.PRIMARY_KEY_1: ID = 59 */ > /* WHERE A.ID = 59 > */ > INNER JOIN PUBLIC.DEP B > /* PUBLIC.PRIMARY_KEY_1: ID NOT IN (BB_INTERSECTS(B,'THE_GEOM', > A.the_geom)) */ > ON 1=1 > WHERE (A.ID <> B.ID) > AND NOT (PUBLIC.ST_INTERSECTS(A.THE_GEOM, B.THE_GEOM) > AND (A.ID = 59) I will implement the function BB_INTERSECTS then we will see about the execution plan alteration. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
