Skip to content

Instantly share code, notes, and snippets.

@foobarbaz-pl
Last active March 2, 2016 09:20
Show Gist options
  • Select an option

  • Save foobarbaz-pl/09bba5e4faef4d2dd7bf to your computer and use it in GitHub Desktop.

Select an option

Save foobarbaz-pl/09bba5e4faef4d2dd7bf to your computer and use it in GitHub Desktop.
Force using spatial index with "use nested loop" hint #oracle #spatial
select /*+ ORDERED USE_NL(s2,s1) */
s1.some_cols
from s1, s2
where s1.some_id = s2.some_id
and sdo_anyinteract(s2.shape, s1.shape) = 'TRUE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment