在不同的数据类型上连接两个表是不是很糟糕,特别是uniqueidentifier和varchar?
final AlertDialog.Builder dialog= new AlertDialog.Builder(this);
((Button)findViewById(R.id.listabutton)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AsyncTask asyncTask= new AsyncTask() {
boolean isconnected=true;
@Override
protected Object doInBackground(Object[] params) {
ConnectivityManager conMgr = (ConnectivityManager)getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = conMgr.getActiveNetworkInfo();
isconnected = activeNetwork != null &&
activeNetwork.isConnectedOrConnecting();
Log.i("StateNet",isconnected+"");
return null;
}
@Override
protected void onPostExecute(Object o) {
if(!isconnected){
dialog.setMessage("Controlla la tua conessione a internet")
.setTitle("Ops problemino con internet")
.setPositiveButton("Ok", ok)
.show();
}
super.onPostExecute(o);
}
};
答案 0 :(得分:2)
是的,肯定是因为这会导致每行不必要的转换到其他类型(如果可以进行隐式转换),并想象如果你有数百万行进行JOIN
操作会怎么样。