-
-
... you can use the statistics generated from table of the database ...
SELECT
[TableName] = so.name,
[RowCount] = MAX(si.rows)
FROM
sysobjects so,
sysindexes si
WHERE
so.xtype = 'U'
AND
si.id = OBJECT_ID(so.name)
GROUP BY
so.name
ORDER BY
2 DESC
... and if you want to have the real data (that is... if you don't trust the statistics)...
DECLARE @SQL VARCHAR(255)
SET @SQL = 'DBCC UPDATEUSAGE (' + DB_NAME() + ')'
EXEC(@SQL)
CREATE TABLE
#foo
( tablename VARCHAR(255), rc INT )
INSERT
#foo
EXEC
sp_msForEachTable
'SELECT PARSENAME(''?'', 1), COUNT(*) FROM ?'
SELECT
tablename, rc
FROM
#foo
ORDER BY
rc DESC
DROP TABLE
#foo
-f.
-
-
X10 (home automation gadgets) just released, almost recently, the CM19a USB interface equivalent to the CM15a Serial Interface that was lets say, a little boggus...
Also, they release a new software, and ... a SDK! If you don't want to register this is a link to the download page.
I'll post a C# example using it soon. Stay tuned.
-f.
-
-
While I was implementing the new way of doing performance counters I had this error.
System.TypeLoadException was unhandled
Message: Generic method or method in generic class is internal call, PInvoke, or is defined in a COM Import class.
The investigation of the problem concluded to have a limitaition in the combinaison of .NET 2.0 Generics and DLLImports. Starting the integration I kept in mind to find out a better way of getting the real tick counts, and that just accelerate my research. The verdict: In the diagnostics assembly I found the StopWatch that is just doing the same thing. For those guys that develop with the 1.1 framework Paul Welter's just back ported it.
-f.
-
-
At some point in the life of a software, we must improve the performance (at least for a server), everybody used the performance monitor to view the state of the system. In .NET we can create very easly our own performance counters and our own categories.
After using it, and doing a lot of counts, I went a some point that I wanted to see the average time spent to do a portion of code, the AverageTimer32 & AverageTimer64 in combinaison with the AverageTimerBase was doing the job. The only thing, is that for atomic operations, we cannot calculate the elapsed time because the DateTime.Now.Tick was returning a wrong value.
An interesting article in the Microsoft Knowledge base was pointing out that you may want to have tick count that Performance Counters required. Guess what, I didn't saw anything in the documentation that was saying that the DateTime Tick was returning a wrong value, and that I must call a most accurate obscur API Call in C#.
[DllImport("kernel32.dll")]
extern static short QueryPerformanceCounter(ref long x);
-f.