使用
我imported a trace档案RowsCount == NULL
虽然analyzing my imported trace file我注意到某些select语句需要花费大量时间(持续时间)和cpu,但最后不会返回任何行(SELECT TextData, ClientProcessID, EventClass
, Duration, StartTime, EndTime
, Reads, Writes, CPU, RowCounts
, EventSequence, TextData_md5_hash
, ApplicationName, SPID
FROM MyImportedTrace
WHERE
TextData_md5_hash in (0x4A943F266010BDD2A47179DC3481BC7F)
ORDER BY SPID, StartTime, EventSequence
)。
TextData
实施例
如果我将同一个查询从Use MyDatabase
SELECT ti.EventClass, te.Eventname, Count(*) as CountAsterisk
, Sum(ti.RowCounts) as RowCountsSum
, Sum(ti.Duration/1000) as DurationSum_ms
, Avg(ti.Duration/1000) as DurationAvg_ms
FROM TraceImport ti
Left JOIN TraceEvents te
ON ti.EventClass = te.EventTraceID
Group By ti.EventClass, te.Eventname
Order By EventClass
- 字段复制到查询窗口中,我会收到很多行(> 200000)
此查询
@interface SomeClass : NSObject
@property int anInt;
@end
@implementation SomeClass
@end
typedef void(^CallbackType)(int a);
- (CallbackType)getCallbackToAssignTo:(SomeClass **)indirectPointer {
return ^(int a){
NSLog(@"indirectPointer is: %p", indirectPointer);
NSLog(@"*indirectPointer is: %p", *indirectPointer);
(*indirectPointer) = [[SomeClass alloc] init];
(*indirectPointer).anInt = a;
NSLog(@"After: indirectPointer is: %p", indirectPointer);
NSLog(@"After: *indirectPointer is: %p", *indirectPointer);
};
}
- (void)iWillNotDoWhatImSupposedTo {
SomeClass *directPointer = nil;
CallbackType cb = [self getCallbackToAssignTo:(&directPointer)];
NSLog(@"directPointer is pointing to: %p", directPointer);
NSLog(@"&directPointer is pointing to: %p", &directPointer);
cb(1);
NSLog(@"after callback directPointer is: %p", directPointer);
NSLog(@"after callback &directPointer is: %p", &directPointer);
}
返回此结果
答案 0 :(得分:1)
"extensionProfile": {
"extensions": [ (...)
{
"properties": {
"publisher": "Microsoft.Azure.Diagnostics",
"type": "IaaSDiagnostics",
"typeHandlerVersion": "1.5",
"autoUpgradeMinorVersion": true,
"settings": {
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"EtwProviders": {
"EtwEventSourceProviderConfiguration": [
{
"provider": "Microsoft-ServiceFabric-Actors",
"scheduledTransferKeywordFilter": "1",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableActorEventTable"
}
},
{
"provider": "Microsoft-ServiceFabric-Services",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableServiceEventTable"
}
}
],
"EtwManifestProviderConfiguration": [
{
"provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
"scheduledTransferLogLevelFilter": "Information",
"scheduledTransferKeywordFilter": "4611686018427387904",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricSystemEventTable"
}
}
]
}
}
},
"StorageAccount": "storageaccountname"
}
},
"name": "VMDiagnostics_Name"
}
返回可能已捕获的每个可能列。
无法保证您正在查看的实际跟踪确实为每个相关事件类捕获sys.fn_trace_gettable
。
根据您目前提供的信息,没有理由认为跟踪没有像这样设置。
在ssms内点击RowCounts
,在Tools / SQL Server Profiler
窗口中打开sql-server-profiler应用,点击标签Trace properties
并确保列{{} 1}}检查事件类Event selection