Intersoft Development, Inc. Home Link
If you are currently using SQL-Server for your business applications, are you sure you are realizing its full potential? SQL 2000 and 2005 are quite powerful, and now SQL Server 2008 extends this power...
Read More...
Intersoft Development emphatically recommends CodeGear Delphi for custom software development! With the newest Embarcadero Delphi 2010 release, Delphi continues its tradition of providing industry-leading unmatched software development capabilities in this RAD programming language and IDE.

Delphi 2010 builds upon the already excellent features and capabilities of Delphi 2009 by adding touch/gesturing support to recent Delphi language enhancements for Generics, Closures / Anonymous-Methods, Unicode, and much more...
Read More...
CEO's Blog Topics Below
Recent Blog Topics:
Looking for affordable professional 2D/3D CAD Software? VariCAD is a full-featured comprehensive 2D/3D CAD package offering:
  • Windows / Linux support
  • 3D modeling with automatic export 2D.
  • Sizing of mechanical components.
  • Plus, predefined library of commnon parts.
  • Quick and intuitive 3D/2D GUI
  • Compatibility with DWG, DXF, IGES, STEP and STL...

FREE 3D CAD Software Trial and Sale - VariCAD

Free Software, Source Code, and Best-Practice Documentation Index from your
Cleveland Software, Database, Web Design, Consulting, and SQL / Delphi Experts

SQL Server - Other:
Basic Speed Testing Loop

This is a test-jig useful when optimizing and fine-tuning the execution speed of various SQL Statements, procedure/function calls, and the likes.

/***************************************************************************************/
-- This is a test-jig useful when optimizing and fine-tuning the execution speed
-- of various SQL Statements, procedure/function calls, and the likes.
-- This is especially useful when there are multiple ways to accomplish the same result, 
-- and you need to see which methods are the fastest under different iteration-counts. 
-- Just insert code to test, set the Iterations, execute, and the resulting elapsed
-- time in Milliseconds (MS) will be displayed.
--
-- For optimal speed comparisons, the data-cache and procedure-cache are cleared 
-- before running, and the data-cache is cleared between each iteration.
/***************************************************************************************/
DBCC DROPCLEANBUFFERS	WITH NO_INFOMSGS	-- Clears the data cache
DBCC FREEPROCCACHE	WITH NO_INFOMSGS	-- Clears the procedure cache
GO

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

DECLARE @starttime DATETIME
SELECT  @starttime = GetDate()

DECLARE @Counter INT
SELECT  @Counter = 0

DECLARE @Iterations INT
SELECT  @Iterations = 100  --Set to desired number of iterations

DECLARE @JUNK INT
DECLARE @ProfileID INT
SELECT @ProfileID

WHILE @Counter < @Iterations
BEGIN
	DBCC DROPCLEANBUFFERS	WITH NO_INFOMSGS	-- Clears the data cache

	--*********************************************************
	--EXECUTE WHATEVER STATEMENT(S) YOU WANT TO SPEED-TEST HERE
	--********************************************************* 
        
	SELECT @Counter = @Counter + 1
        
END  --While loop
        
SELECT DateDiff(ms, @starttime, GetDate()) --Display elapsed Milliseconds 
 
.NET framework version: 2.0.50727.3615