• I was able to workaround the issue by forcing spatial index usage.

    This problem is interesting because it was only one query which is using this dynamic cursor. All other queries from Oracle are using keyset cursor. I have seen the code and they look same on Oracle site. I was able reproduce this with sql server by setting cursor type to dynamic.