Added a function prototype to check if an attribute is indexed, added some comments for selectplan1
Added a function prototype to check if an attribute is indexed, added some comments for selectplan1