[SQL optimization] better field type, better comments [#265]