Sysads Gazette

Linux tutorials, howtos and step by step guides

Mozilla prototype Firefox OS Simulator v1.0

Late last year the Mozilla crew introduced its Firefox OS simulator v1.0 as promised, allowing web developers to begin testing of their applications from within the comfort of their Windows/Mac/Linux computers hence allowing for more user testing. Currently its mobile phone Firefox OS is still under development, release date not yet announced. Click herefor more details on the simulator… Watch the screencast showing Firefox OS Simulator in action… What is the future like for this OS compared to the big players like the Android, Apple IOS, Microsoft Windows Mobile, Blackberry … ?

Top Cached SPs By Total Logical Writes (SQL 2008)

[sourcecode language=”sql”] SELECT TOP(25) p.name AS [SP Name], qs.total_logical_writes AS [TotalLogicalWrites], qs.total_logical_writes/qs.execution_count AS [AvgLogicalWrites], qs.execution_count, ISNULL(qs.execution_count/DATEDIFF(Second, qs.cached_time, GETDATE()), 0) AS [Calls/Second], qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count AS [avg_elapsed_time], qs.cached_time FROM sys.procedures AS p WITH (NOLOCK) INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK) ON p.[object_id] = qs.[object_id] WHERE qs.database_id = DB_ID() ORDER BY qs.total_logical_writes DESC OPTION (RECOMPILE); [/sourcecode] — Logical writes relate to both memory and disk I/O pressure — This helps you find the most expensive cached stored procedures from a write I/O perspective

Lists top statements by average input/output usage for current database

[sourcecode language=”sql”] SELECT TOP(50) OBJECT_NAME(qt.objectid) AS [SP Name], (qs.total_logical_reads + qs.total_logical_writes) /qs.execution_count AS [Avg IO], SUBSTRING(qt.[text],qs.statement_start_offset/2, (CASE WHEN qs.statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), qt.[text])) * 2 ELSE qs.statement_end_offset END – qs.statement_start_offset)/2) AS [Query Text] FROM sys.dm_exec_query_stats AS qs WITH (NOLOCK) CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt WHERE qt.[dbid] = DB_ID() ORDER BY [Avg IO] DESC OPTION (RECOMPILE); [/sourcecode] — Helps you find the most expensive statements for I/O by SP