Heavy Fragmentation

May 8, 2007

I'm attempting to debug some query timeouts on a production server.

Several tables involved in this query have logical scan fragmentation levels around 10%, and extent scan fragmentation levels 90%+.

Running INDEXDEFRAG or DBREINDEX reduces the logical scan fragmentation down to almost 0%, but the extent scan fragmentation stays upwards of 90%.

Why? What can I do to get this fragmentation down? Is it because this particular index is on a GUID?

View 7 Replies


ADVERTISEMENT

Problems On Heavy Load

Mar 31, 2008

Hi,

When running a test against SQL Server 2005 Express most of the connections work fine, but some don't. I get that Exception;

When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

It seems to me I am reaching some kind of limitation. What can I do to increase the number of connectionst?

Regards, Jean

View 8 Replies View Related

Timout - SQL Not Responding Under Heavy Load

Apr 1, 2005

Hi,
Our app uses an NT4 SQL 2k box and a Win2k IIS box.  To fulfill the text searching requirements we've had to use dynamic SQL (created within a large SP).  This query searches about 8000 rows in a flat table (which we create and keep up to date using a scheduled SP which trawls the underlying tables).  It's a complicated SP, and can return all 8000 rows (I think we're winning the battle to have this capped though).
When we get about 50 users hitting the app and doing searches simultaneously, performance drops severely (20 secs+ for a query rather than ~2 secs), and we get a lot of errors - which report that:
Source: .Net SqlClient Data ProviderMessage: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
We also get a lot of Invalid Viewstate errors, which i'm totally baffled by, and the odd IIS Access Denied error - as if authentication (NTLM) is timing out.
Neither the Web not the SQL machines are being hit very hard - the web server in particular is not under any strain whatsoever.
It doesn't appear to be related to connection pooling, from the logged error messages we're getting.
Does anyone have ANY suggestions as to where I should be looking?! 

View 3 Replies View Related

Coping Data Into A New DB With Heavy Constrants

Mar 21, 2007

I'm trying to take data and push it into a new database.

This data was taken from a database where there were many contraints, FK etc. quite a complicated structure and now sent to us with just the data in the tables with none of these constraints, FK!!

This data now needs pushing into the original database structure, so all the data will live within the constraints, but using an insert SPROC throws some FK errors, what is the best way to push this data into it's structure!

somebody suggested DTS but this doesn't take into account the constraints, also we need to run this at anytime for a number different datasets. Can anybody help ?(if you can decipher my explantion)

Many thanks for reading, please indicate if you need more info.

Shrew

View 1 Replies View Related

Heavy Bulk- Insert Task

Jan 18, 2008

I am doing heavy Bulk insert task to one Database.When i checked the Activity Monitor I saw it was suspended and Wait type:PAGEIOLATCH_EX
So it stopped itself.Do any experts have good idea about what is going on?

Appreciate for help

View 17 Replies View Related

Log Backups On Heavy And Busy Database

Apr 30, 2008


What will be best procedure for the following situation.

Heavy traffic database on daily basis. G growth every day. so Full backups every nights are needed.
Vendor recommends not taking Log backups but copy just log files over other location. will this help avoid degrading the performance during business hours.

if i don't take log backups, i am not able to recover Point in time if needed.
also log files can then grow faster and then i will have to shrink it more often.

what are risks and suggestions.

Thanks,

View 5 Replies View Related

Decreased Memory Usage When The Workload Is Heavy?

Nov 6, 2007

I have a specific job that should be run with a decreased memory usage when the workload is heavy on the SQL Server.
This is a heavy job that has no specific requirement when it comes to response time.
It is important that the rest of the application shouldn’t be affected with longer response time when this job is running. 
How can this job bee handled from the application, without having to create a separate batch job.

View 1 Replies View Related

Best Way To Execute Heavy Sprocs Wihtout Slowdown

Aug 27, 2007

Hi,

Just a general question here.. I'm designing a web application that might have 50 million - 100 million rows plus. Basically its a simple logging table each row probably only 24 bytes wide, however I can see it taking quite awhile to execute.

The query is basically a group by, showing the amount of "hits" per day.

Are there any special types of strategies I should implement ? Or is a properly designed structure with indexes likely sufficient (on the right hardware of course)

Thanks for any advice!,
Mike

View 7 Replies View Related

How Can I Tell Which Queries/stored Procedures Are Heavy Users Of Tempdb?

Jan 11, 2008

I'm using sql 2005. I tried using Profiler with a filter on TempDB but it doesn't seem to record the activity.

Thanks.

View 4 Replies View Related

SQL Server 2012 :: Adding 2 COUNT Statements Results In Heavy Query

Jan 28, 2014

These separate COUNT queries are very fast:

SELECT COUNT(id) as viewcount from location_views WHERE createdate>DATEADD(dd,-30,getdate()) AND objectid=357
SELECT COUNT(id)*2 as clickcount FROM extlinks WHERE createdate>DATEADD(dd,-30,getdate()) AND objectid=357

But I want to add the COUNT statements, so this is what I did:

select COUNT(vws.id)+COUNT(lnks.id)*2 AS totalcount
FROM location_views vws,extlinks lnks
WHERE (vws.createdate>DATEADD(dd,-30,getdate()) AND vws.objectid=357)
OR
(lnks.createdate>DATEADD(dd,-30,getdate()) AND lnks.objectid=357)

Turns out the query becomes immensely slow. There must be something I'm doing wrong here which results in such bad performance, but what is it?

View 7 Replies View Related

Calling A Custom Web Service From My Package To Perform Heavy-duty Tasks

Mar 20, 2007

As part of my SSIS package, a list of sites is created that need to be created on a remote machine. let's say 1000 sites. I need to pass this list to a web service so web service sitting on that machine creates these sites for me. MY SSIS package does not run frequently so I can sacrifice time a little bit to get better functionality.

I need to move the sites that are not created (for any reasons) by web service to another table and successfully created sites to another table, so I need to get confirmation for each site from the web service.

Which option is better?

1) Calling web service for every single record (site) and get the confirmation and then based on the confirmation I move the records accordingly. I know this might be very time consuming, but as I said my SSIS package might only run every six months

OR

2) Sending records to a web service in a batch and get the result. I don€™t know how to do this though.

Any help or better solution is appreciated.

View 3 Replies View Related

Fragmentation

May 13, 2008

 i want to do fragmentation using SQL 2005 Express. Can their be any helping material for making fragmentation.  Any Example

View 2 Replies View Related

Fragmentation

Mar 29, 2001

What DBCC or otherwise one would be able to find table fragmentation in SQL 7 and how to take some proactive actions ?

Thanks very much for your time.


-Tim

View 2 Replies View Related

Fragmentation

Jun 1, 2004

Would someone please let me know which is the better way to reduce fragmentation on Windows:NT drive?
dbcc indexdefrag
or
dbcc reindex
or
dropping and recreating indexes through SQL?

Thanks
Vinnie

View 5 Replies View Related

Fragmentation?

Jul 27, 2007

Sql Server 2000.

For simplicity, I am avoiding minor details.

Here is a scenario.

Create Table T (T_ID int PK, €¦..) and this table is referenced by 20 other places on T_ID.

And these 20 tables have T_ID as PK or part of PK.

We have large volume of deletes in T and in the other 20 tables based on T_ID.

Once the deletes are done, will dropping and re-creating the FK€™s that reference the T_ID
help reduce the fragmentation caused by the deletes?

View 4 Replies View Related

Table Fragmentation

May 8, 2001

hi all,

i have inherited a database running on sql7 sp2. a lot of the tables do not have a clustered index. some of these tables are highly fragmented. below is a sample of the dbcc showcontig output

TABLE level scan performed.
- Pages Scanned................................: 104934
- Extents Scanned..............................: 13124
- Extent Switches..............................: 13123
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 99.95% [13117:13124]
- Extent Scan Fragmentation ...................: 5.84%
- Avg. Bytes Free per Page.....................: 7757.4
- Avg. Page Density (full).....................: 4.16%

this table has 5 non-null char columns whose total length is 43 chars and the table occupies about 900 mb for only about 670,000 rows!
select on the table sucks!

since there is no clustered index i have to rebuild the table to remove the fragmentation. is there a way to reorganize the table without recreating it?

thanx

:-)

hemant

View 1 Replies View Related

Fragmentation -Urgent

Oct 13, 2000

Hi!

I have a problem with defragmenting the tables. When i ran dbcc showcontig for the tables, it shows 94%, 50%, 33% fragmentations . I have rebuild indexes on all those tables and ran dbcc showcontig again but still it shows the same % of fragmentations. Is there any way to remove fragmentation on all the tables completely. Any help would be appreciated.

Thanks,
Saran

View 2 Replies View Related

Disk Fragmentation && SQL

Apr 14, 2004

One of my production servers has been determined to be 92% fragmented.

What's the proper procedure for defraging a database server?

I couldn't find anything very helpful in BOL, nor Knowledge Base.

Sidney Ives
Database Administrator
Sentara Healthcare

View 3 Replies View Related

Disk Fragmentation

Aug 9, 2004

What's the best way to find out if disk fragmentation on Windows 2000 Server is affecting SQL Server performance?

If disk fragmentation is shown to be a cause of performance problems, what are the recommendations for a disk fragmentation strategy? eg. use the win 2000 built in disk defrag utility or buy a 3rd party product like DiskKeeper? How much of an overhead is a product like DiskKeeper that defrags in the background?

Clive

View 1 Replies View Related

Database Fragmentation

Oct 1, 2004

Hello,

How can I mesure the database fragmentation ? Cause DBCC SHOWCONTIG shows obects fragmentation only. I would like to see the whole database fragmentation.

Thanks for help

View 12 Replies View Related

Index Fragmentation

Jun 22, 2008

What functions of tools do you use for managing index fragmentation?

DBCC?

I am working through MS Press SQL 2005 book and it mentions the
sys.dm_db_index_physical_stats function? It then give an example of code which is very involved.

Does anybody use this function?

Thanks

View 10 Replies View Related

Index Fragmentation

May 10, 2007

before rebuild index
---------------------
tablenameIndexname
avg_fragmentation_in_percent
Payoff_QuotePK_Payoff_QuoteDetail
83.3333333333333
ALTER INDEX ALL ON Payoff_Quote REBUILD
after issue the above statement result remain same.

View 1 Replies View Related

Index Fragmentation

Jun 24, 2007

Hi
When I run sys.dm_db_index_physical_stats on AdventureWorks.Production.Product, I get an average fragmentaion of 46%, 0%, 25% & 50% on the Indexes.

I run ALTER INDEX ALL ON AdventureWorks.Production.Product
REBUILD WITH (FILLFACTOR = 80, SORT_IN_TEMPDB = ON,
STATISTICS_NORECOMPUTE = ON)

and the index fragmentation does not change...

Why is that?? I have tried refreshing the table and the statistics but why does it look like rebuilding the indexes has done nothing?

View 1 Replies View Related

Index Fragmentation In The DMV

Sep 25, 2007

I have a nice script that will look at the index fragmentation by using the DMV (sys.dm_db_index_physical_stats) and if its above a specificed threshhold, it will rebuild or reorg the index.

What I have noticed is that even after reorging and/or rebuilding the index, the fragmentation percent in the DMV does not change for some indexes. Other indexes are updated just fine.

Is this a result of updating statistics? Why would the fragmentation change for some indexes and not others? Why does it seem no matter how much rebuilding or reorging is done, the fragmentation percent for some indexes does not change?


- Eric

View 6 Replies View Related

SQL Backup (bak) Fragmentation

Dec 13, 2006

We backup a lot of SQL databases. The db admin uses SQL to dump the databases to a *.bak file on a network share, then we pick them up to tape.

The problem is that for some reason, the backup files are MASSIVELY fragmented, which kills our backup speed to tape (via Netbackup Enterprise). If I defragment the drive (via the built-in tool on Win2K3 or PerfectDisk 8) our speed to tape more than doubles (can go from 16MB/sec to 36MB/sec). However, after the next SQL backup, the drive is completley fragmented once again (around 70%).

Is there any way to improve how these files are written to disk (to keep them relatively in one piece)? For some reason it appears this is a bigger issue with the SQL backup files than any other file type. Thanks.



Jim B

View 3 Replies View Related

Fragmentation Does Not Change

Aug 8, 2007

I am running this script to see the fragmentation of indexes.



SELECT a.database_id

,a.object_id

,a.index_id

,b.name

,a.avg_fragmentation_in_percent

FROM sys.dm_db_index_physical_stats (7,NULL, NULL, NULL, NULL) AS a

JOIN sys.indexes AS b

ON a.object_id = b.object_id

AND a.index_id = b.index_id

where a.database_id = db_id()

order by a.avg_fragmentation_in_percent desc



When I rebuild an index the fragmentation does not change 10% or lower (default index fill factor is 0, which I think is 90% fill)

SQL Server 2005 EE SP 2

Thanks,
~Joseph~

View 1 Replies View Related

I/O Error 1450, Error 823 During Heavy Loads

Apr 2, 2004

Hi,

We're experiencing the following error regularly:
"I/O error 1450(Insufficient system resources
exist to complete the requested service.)"

We are running SQL2000 with 2GB memory, Windows 2000 AS, 4 CPUs. We are using a SAN storage connected by 2 Fibre cards. The databases range from 10GB to 400GB in size for decision support applications.

Although it seems clear that the disk subsystem is causing this error, our hosting party is blaming the application layer for this behaviour.

From the SQL server log:
I/O error 1450(Insufficient system resources exist to complete the requested service.) detected during read at offset 0x00000350860000 in file 'O:DATASA_Data.MDF'..
Error: 823, Severity: 24, State: 2
I/O error 1450(Insufficient system resources exist to complete the requested service.) detected during read at offset 0x00000350862000 in file 'O:DATASA_Data.MDF'..
Error: 823, Severity: 24, State: 2

From the event log:
[..]
dmio: Harddisk37 read error at block 23192007: status 0xc000009a
dmio: Harddisk35 read error at block 23192135: status 0xc000009a
dmio: Harddisk36 read error at block 23192127: status 0xc000009a
dmio: Harddisk36 read error at block 23192263: status 0xc000009a
[etc]
dmio: Disk Harddisk31 block 23193791 (mountpoint O:): Uncorrectable read error
[..]

Does anyone have any suggestions??

Desmond

View 6 Replies View Related

Fragmentation Of SQL Data Files

Mar 30, 2004

Hi,

How do you defragement SQL database data files? Running the DBCC DBREINDEX , DBCC INDEXDEFRAG, does that minimize fragmentations of the tables and the indexes files or is it just the index files?
Thanks in advance

a

View 6 Replies View Related

Index Showing Fragmentation

May 11, 2015

We have nightly job running to reorg all in one of our prod database. But the index on one of the table fragmenting quickly by the morning showing 90% fragmentation.

View 9 Replies View Related

SQL Server Memory Fragmentation

Dec 7, 2006

Abe writes "i am using SQL server 2000, when i tried to back up the database in SQL server, the backup began failing coz SQL Server could no longer allocate 964kb of contiguous blocks. (the min needed is 1MB)

What causes the memory or blockes to be fragmented?

How do you solve this issue other than rebooting the server?

How do you prevent this from happening or monitor this issue?

Regards,
Abe"

View 1 Replies View Related

Logical Scan Fragmentation

Aug 16, 2007

I have a table with 50% Logical Scan Fragmentation. [ according to Dbcc Showcontig (myTable) ]
Why after running DBCC INDEXDEFRAG (myDB,myTable) does it still sit at 50%.
Why isn't it lower?

View 7 Replies View Related

Catch-22 With Fragmentation And Shrinking

Sep 10, 2007

I've inherited a SQL 2005 Server with a major problem. It's been badly admin'd for ages.

It's got a 250gb disk with 3% space free. The disk is 93% fragmented. There is a sql data file of 231gb on that volume that i'm trying to shrink as it has 92gb of free space on it apparently. It won't shrink because the fragmentation is too bad - it just hangs for 2 days then times out. I've tried shrinking the files and database to no avail. I can't defrag as it just says it's finished after 2 minutes and doesn't do anything.

Any suggestions or am I screwed?

View 5 Replies View Related

System Tables Fragmentation

Jul 20, 2005

can you defrag system tables. They appear in my dbcc showcontigreport. Some are worse than other but if it where a user table Iwould defrag it. However the reindex commands doesnt work on systemtables.... Any ideas.Thanks Matt.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved