refactor information schema query