提交 5f81737e 编写于 作者: S serge-rider

QMDB - search performance

上级 41850f87
......@@ -123,12 +123,12 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
}
private LogColumn COLUMN_TIME = new LogColumn("time", CoreMessages.controls_querylog_column_time_name, CoreMessages.controls_querylog_column_time_tooltip, 80) {
//private final DateFormat timeFormat = new SimpleDateFormat(DBConstants.DEFAULT_TIME_FORMAT, Locale.getDefault()); //$NON-NLS-1$
private final DateFormat timestampFormat = new SimpleDateFormat("MMM-dd HH:mm:ss", Locale.getDefault()); //$NON-NLS-1$
private final DateFormat timeFormat = new SimpleDateFormat("MMM-dd HH:mm:ss", Locale.getDefault()); //$NON-NLS-1$
private final DateFormat timestampFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault()); //$NON-NLS-1$
@Override
String getText(QMMetaEvent event)
{
return timestampFormat.format(event.getObject().getOpenTime());
return timeFormat.format(event.getObject().getOpenTime());
}
String getToolTipText(QMMetaEvent event) {
return timestampFormat.format(event.getObject().getOpenTime());
......@@ -149,7 +149,8 @@ public class QueryLogViewer extends Viewer implements QMMetaListener, DBPPrefere
if (object instanceof QMMStatementExecuteInfo) {
QMMStatementExecuteInfo statement = (QMMStatementExecuteInfo) object;
//return SQLUtils.stripTransformations(statement.getQueryString());
return CommonUtils.truncateString(statement.getQueryString(), 4000);
return CommonUtils.truncateString(
CommonUtils.notEmpty(statement.getQueryString()), 4000);
} else if (object instanceof QMMTransactionInfo) {
if (((QMMTransactionInfo) object).isCommitted()) {
return CoreMessages.controls_querylog_commit;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册