added code to use a common SQLTableProcessContextIndex instances among the main and sub queries.