[dba-SQLServer] Optimizing nVLDB databases

John W. Colby jwcolby at colbyconsulting.com
Sun Sep 5 18:05:59 CDT 2004


That is a time saver!

Thanks,

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Sunday, September 05, 2004 6:26 PM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Optimizing nVLDB databases


On 5 Sep 2004 at 11:12, John W. Colby wrote:

> OK it's time to talk about how to speed things up.  I now have a SQL 
> Server machine with (4) 250g SATA data drives each containing one file 
> from the database.  The four files together form a single database 
> with a single table which as of this morning contains 27 million 
> records.  Doing a count
> (*) from another machine took 18 minutes to count 24 million records.  
> 
> What can I do to speed up this count function?

Repeat from my posting in this list pm Sat 21 Aug 04. 

There is another way to determine the total row count in a table. You can 
use the sysindexes system table for this purpose. There is ROWS column in 
the sysindexes table. This column contains the total row count for each 
table in your database. So, you can use the following select statement 
instead of above one:

SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 
2


-- 
Stuart


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list