Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Counter Table (table of numbers) Setter-Upper for SQL Server 2000

By Jesse Roberge, 2013/05/24

Counter Table (table of numbers) Setter-Upper for SQL Server 2000
By Jesse Roberge - YeshuaAgapao@gmail.com

CounterSmall - completely fills a single data page (two logical reads per seek or scan). 620 numbers.
Counter - completely fills a two-level clustered index (two logical reads per seek). 384,400 numbers.
CounterBig - completely fills a three-level clustered index (three logical reads per seek). 238,328,000 numbers.

CounterSmall and Counter populate in 2-4 seconds, including statistics and index rebuilds.
CounterBig is commented as it usually isn't needed. It takes a bit to populate this and pigs a lot of space. Un-comment it only if you need it.

Copyright:
Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software.
Copyleft lets you do anything you want except plagarize, conceal the source, or prohibit copying & re-distribution of this script/proc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.

Total article views: 443 | Views in the last 30 days: 1
 
Related Articles
SCRIPT

Counter Table (table of numbers) Setter-Upper for SQL Server 2005

Sets up 3 'table of numbers' that completely fill a 1, 2, and 3-level clustered index respectivly wi...

FORUM

counters

counters help

FORUM
FORUM

check counters

check counters

FORUM

PerfMon Error

Counters

Tags
advanced querying    
counter    
development    
miscellaneous    
nums    
sql server 7    
sqlinsider scripts    
table    
table of numbers    
tally    
t-sql    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones