Showing posts with label scan. Show all posts
Showing posts with label scan. Show all posts

Friday, March 9, 2012

Does DBREINDEX run longer on tables with lower scan density

I am looking into a way to generate and execute DBCC DBREINDEX statements
during scheduled down time. For a particular table - I need to be able to
estimate how long it will take to REINDEX a particular table.
Let say for example I have a table that had 25000 extents and
1) the ScanDensity was 50.
2) the ScanDensity was 15.
Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
ScanDensity of 15 (as opposed to 50)?
Thanks in advance
Tom-- TJTODD wrote: --
> Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
> ScanDensity of 15 (as opposed to 50)?
--
Hi Tom,
I have not found any official documentation on this area. The only way to find out is to do your own empirical benchmarks.
Hope this helps,
-Eric Cárdenas
SQL Server support|||Tom,
The only thing I can think of is that it will obviously take longer time for SQL Server to scan the
source data if the scan density is low. I'd think that in the whole, this would count as marginal,
though.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"TJTODD" <Thxomasx.Toddy@.Siemensx.com> wrote in message
news:OzZlndSuDHA.2304@.tk2msftngp13.phx.gbl...
> I am looking into a way to generate and execute DBCC DBREINDEX statements
> during scheduled down time. For a particular table - I need to be able to
> estimate how long it will take to REINDEX a particular table.
> Let say for example I have a table that had 25000 extents and
> 1) the ScanDensity was 50.
> 2) the ScanDensity was 15.
> Would it take SIGNIFICANTLY longer to REINDEX the table if it had a
> ScanDensity of 15 (as opposed to 50)?
> Thanks in advance
> Tom
>

Sunday, February 19, 2012

Documenting existing stored procedures

Does anyone have any scripts, or know of any tools, that can scan through all of the SPs that I have inherited, documenting details?
ThxThis will retrieve the name and text of all the stored procedures.

SELECT a.name, b.text
FROM sysobjects a INNER JOIN syscomments b ON
a.id = b.id
WHERE
a.xtype = 'P'

This will retrieve the input parameters for all stored procedures in a database:

SELECT a.name, b.*
FROM sysobjects a INNER JOIN syscolumns b ON
a.id = b.id
WHERE
a.xtype = 'P'

What else are you looking to do?|||thanks! :o :o|||Did you use Enterprise Manager to script out the stored procedures and the like?

You can use this to Search your database (http://weblogs.sqlteam.com/brettk/archive/2004/02/05/841.aspx)

Good Luck