add the sql into index