Hi,
a lot of my users were asking me to have the possibilty of a freeze
pane (similar to excel) in the RS web reports because often the reports
are to long to see the column haeders. Especially when you have
drilldowns it would help.
Has somebody tried to implement such feature by DLL to RS 2000. Is this
feature planned for RS 2005 '
thanks
BBThe only way (that I know of) to accomplish what you're asking for is to have
a custom application that modifies the output file after it has been saved
and then forwards it to the person who initially requested it. We have one
non-RS custom application that does this (internal use only) and are working
on a way to do this with RS rendered reports.
Basically what your application has to do:
1- Client requests report
2- Application renders report in excel and saves to disk.
3- Appliation modifies the excel file properties (page margins, fit to
page, freeze panes, etc.)
4- Appliation passes modified file to the Client
It's a lot of work.
"BB_Reporting" wrote:
> Hi,
> a lot of my users were asking me to have the possibilty of a freeze
> pane (similar to excel) in the RS web reports because often the reports
> are to long to see the column haeders. Especially when you have
> drilldowns it would help.
> Has somebody tried to implement such feature by DLL to RS 2000. Is this
> feature planned for RS 2005 '
> thanks
> BB
>
Showing posts with label sp2. Show all posts
Showing posts with label sp2. Show all posts
Friday, March 9, 2012
freeze header
Hello,I just installed SP2, can I freeze header at the top in this version?Thanks,Jim.can you xplain your question ?
Sunday, February 19, 2012
framework 1.1 update + ssmse: get warning!?
Hello, friends,
here is my problem:
I installed sql server express on a naked Windows xp pro with SP2; of course, framework 2.0 installed, and MS-installer 3.1 installed as well. I also installed ssmse. Everything worked fine.
Then I installed all windows updates via Windows Update in internet.
Now suddenly, when starting ssmse, I get a Warning Textbox with Header "Microsoft SQL Server Management Studio Express", then the yellow triangle with the exklamation mark, but NO TEXT AT ALL, and the OK-button. So unfortunately, I do not know what to do. Only thing I found out was, that in all updates, the culprit surely is framework 1.1 update. Before installing this, everything worked fine, afterwards, well, see above.
When I click the ok-button, everything works fine, I can log in into sql server express and do what I have to do.
So my only solution at the moment is just to ignore the warning - not the best way.
Couldn't find a better solution until now.
Could anybody help?
here is my problem:
I installed sql server express on a naked Windows xp pro with SP2; of course, framework 2.0 installed, and MS-installer 3.1 installed as well. I also installed ssmse. Everything worked fine.
Then I installed all windows updates via Windows Update in internet.
Now suddenly, when starting ssmse, I get a Warning Textbox with Header "Microsoft SQL Server Management Studio Express", then the yellow triangle with the exklamation mark, but NO TEXT AT ALL, and the OK-button. So unfortunately, I do not know what to do. Only thing I found out was, that in all updates, the culprit surely is framework 1.1 update. Before installing this, everything worked fine, afterwards, well, see above.
When I click the ok-button, everything works fine, I can log in into sql server express and do what I have to do.
So my only solution at the moment is just to ignore the warning - not the best way.
Couldn't find a better solution until now.
Could anybody help?
Kind regards from
Axolotl, Mellendorf, Germany
Have you tried to reinstall / repair the management tools again. This would not take long and should re connect any links or references that were lost.
|||Hello, Glenn,
thanks a lot for your answer.
Unfortunately, I tried that several times, also with a brand new installed windows xp pro sp2.
But, must tell you, I DID find a solution:
I downloaded the sqlexpr_toolkit_ger.exe, installed it, and now this strange message has disappeared, and ssmse is working without any problems...
I think, there might be any file destroyed by updating framework 1.1 which is reinstalled by the toolkit!?
Doesn't matter, it works.
Kind regards from
Axolotl
fragmented database files
I have a sql server 2005 server, running on windows server 2003 sp2 on
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any helpHi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!! :) That is what can happen when you use default settings.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any helpHi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!! :) That is what can happen when you use default settings.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
fragmented database files
I have a sql server 2005 server, running on windows server 2003 sp2 on
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any help
Hi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>
|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!!
That is what can happen when you use default settings.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any help
Hi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>
|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!!
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
fragmented database files
I have a sql server 2005 server, running on windows server 2003 sp2 on
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any helpHi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!!
That is what can happen when you use default settings.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
a 32 bit dual processor dell machine.
I have have some smallish databases on this machine. The drives which
hold the MDF and LDF files have become badly fragmented. Some of the
log files have been split into tens of fragments. The distribution
database has over 100 fragments. I can see that this is bad for
performance, how bad? In the past, this machine has become very
unhappy when producing replication snapshots (with lots of page io
latch* waits). Now it seems to have become CPU bound (showing SOS
scheduler waits). I'm not saying these things are connected, but just
throwing out some data.
Any thoughts on defragmenting, reducing fragmentation in the future
and any connection to (recently) worsening performance?
One idea I had is that there is plenty of space on the drives (>50%)
if I shut down sql server and then moved the files to another physical
drive and then copied them back, would that put them back in a non-
fragmented way (given that there is a contiguos block of free space
that is big enough.. it looks like there is from defrag console, but
I'm not sure how accurate that is)
thanks for any helpHi Sam
Disc fragmentation is usually less of an issue if you have a dedicated file
server and don't (auto) shrink the databases. On a database server (such as
a development PC) which has shared usage it may be more of an issue
especially if you are continually backing up/restoring databases (or if you
shrink the database). See
http://www.karaszi.com/SQLServer/info_dont_shrink.asp for more.
To defragment the database files you will either have to detach the database
or stop SQL server while you run a disc defragmenter. Tools such as
diskeeper can help reduce fragmentation.
John
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>|||If your database files are as extremely fragmented as you describe
then I suggest a few things.
1) This sort of problem can result from using autoshrink. Check to
see if it is being used, and if it is remove it! At the same time
size the files so that autogrow is not needed.
2) Defragment the drives. The database file fragmentation might can't
be helping your performance problems, and might improve things.
3) Monitor the system. Expand the files before they autogrow - the
worst time to expand a file is when a transaction has to wait for the
growth to complete. Add space in large chunks, not small bits.
Roy Harvey
Beacon Falls, CT
On Fri, 28 Dec 2007 06:15:47 -0800 (PST), "sam.m.gardiner"
<sam.m.gardiner@.gmail.com> wrote:
>I have a sql server 2005 server, running on windows server 2003 sp2 on
>a 32 bit dual processor dell machine.
>I have have some smallish databases on this machine. The drives which
>hold the MDF and LDF files have become badly fragmented. Some of the
>log files have been split into tens of fragments. The distribution
>database has over 100 fragments. I can see that this is bad for
>performance, how bad? In the past, this machine has become very
>unhappy when producing replication snapshots (with lots of page io
>latch* waits). Now it seems to have become CPU bound (showing SOS
>scheduler waits). I'm not saying these things are connected, but just
>throwing out some data.
>Any thoughts on defragmenting, reducing fragmentation in the future
>and any connection to (recently) worsening performance?
>One idea I had is that there is plenty of space on the drives (>50%)
>if I shut down sql server and then moved the files to another physical
>drive and then copied them back, would that put them back in a non-
>fragmented way (given that there is a contiguos block of free space
>that is big enough.. it looks like there is from defrag console, but
>I'm not sure how accurate that is)
>thanks for any help
>|||1) You should set the database and log file sizes such that you never
actually HIT an autogrow. That mechanism should only be for exceptional,
unexpected situations. Making the files big enough to handle say 1.5 years
of data growth leads to a contiguous disk file (and thus sequential I/O) and
no fragmentation.
2) I had a client where I got back 18% throughput simeply by having them
defrag their disks. They had well over 300K database and log file fragments
though!!
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"sam.m.gardiner" <sam.m.gardiner@.gmail.com> wrote in message
news:665d5dc6-832b-41af-a8a9-ca141dc7e3b7@.c4g2000hsg.googlegroups.com...
>I have a sql server 2005 server, running on windows server 2003 sp2 on
> a 32 bit dual processor dell machine.
> I have have some smallish databases on this machine. The drives which
> hold the MDF and LDF files have become badly fragmented. Some of the
> log files have been split into tens of fragments. The distribution
> database has over 100 fragments. I can see that this is bad for
> performance, how bad? In the past, this machine has become very
> unhappy when producing replication snapshots (with lots of page io
> latch* waits). Now it seems to have become CPU bound (showing SOS
> scheduler waits). I'm not saying these things are connected, but just
> throwing out some data.
> Any thoughts on defragmenting, reducing fragmentation in the future
> and any connection to (recently) worsening performance?
> One idea I had is that there is plenty of space on the drives (>50%)
> if I shut down sql server and then moved the files to another physical
> drive and then copied them back, would that put them back in a non-
> fragmented way (given that there is a contiguos block of free space
> that is big enough.. it looks like there is from defrag console, but
> I'm not sure how accurate that is)
> thanks for any help
>
Fragmentation Problem
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have have
0.0% Fragmentation.
Thanks for any help.
1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
|||The table is so small that the reported fragmentation will make no
difference to performance.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.
|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and create
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update the
> fields at all after they were in place? That too can lead to fragmentation.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>
>
|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have have
> 0.0% Fragmentation.
> Thanks for any help.
|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>
|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> DXC,
> You should not worry about fragmentation on a table with only 1,964 records.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...[vbcol=seagreen]
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have have
0.0% Fragmentation.
Thanks for any help.
1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
|||The table is so small that the reported fragmentation will make no
difference to performance.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.
|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and create
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update the
> fields at all after they were in place? That too can lead to fragmentation.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>
>
|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have have
> 0.0% Fragmentation.
> Thanks for any help.
|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>
|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> DXC,
> You should not worry about fragmentation on a table with only 1,964 records.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...[vbcol=seagreen]
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
Fragmentation Problem
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have hav
e
0.0% Fragmentation.
Thanks for any help.1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.|||The table is so small that the reported fragmentation will make no
difference to performance.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and crea
te
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update t
he
> fields at all after they were in place? That too can lead to fragmentatio
n.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>
>|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but th
e
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes an
d
> update statistics but result is the same or similar. Other tables I have h
ave
> 0.0% Fragmentation.
> Thanks for any help.|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but th
e
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes an
d
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks
.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> DXC,
> You should not worry about fragmentation on a table with only 1,964 record
s.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
>|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...[vbcol=seagreen]
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
>
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have hav
e
0.0% Fragmentation.
Thanks for any help.1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.|||The table is so small that the reported fragmentation will make no
difference to performance.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and crea
te
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update t
he
> fields at all after they were in place? That too can lead to fragmentatio
n.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>
>|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but th
e
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes an
d
> update statistics but result is the same or similar. Other tables I have h
ave
> 0.0% Fragmentation.
> Thanks for any help.|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but th
e
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes an
d
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks
.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> DXC,
> You should not worry about fragmentation on a table with only 1,964 record
s.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
>|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...[vbcol=seagreen]
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
>
Fragmentation Problem
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have have
0.0% Fragmentation.
Thanks for any help.1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.|||The table is so small that the reported fragmentation will make no
difference to performance.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and create
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update the
> fields at all after they were in place? That too can lead to fragmentation.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> > SQL Server 2005 SP2.
> >
> > I have a table with 1964 rows of data in it. I have a primary key and 4
> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> > column per index) and the other 2 indexes are on the int column (Again 1
> > column per index).
> >
> > The problem is, when I go to "Properties" then select the "fragmentation"
> > of the indexes, for the first index (varchar(80)) I have;
> >
> > Page fullness: 99.72%
> > Total Fragmentation: 85.71%
> >
> > Second index (varchar(80)) I have;
> >
> > Page fullness: 86.72%
> > Total Fragmentation: 87.50%
> >
> > The third index (int column)
> >
> > Page fullness: 88.95%
> > Total Fragmentation: 66.67%
> >
> > The fourth index (int column)
> >
> > Page fullness: 84.90%
> > Total Fragmentation: 75.00%
> >
> >
> > I have re-created the table in another database and add the indexes but
> > the
> > similar result. Why do I have the fragmentation on the indexes ?. Is it
> > because of the data type ?. I also tried drop-recreate, rebuild indexes
> > and
> > update statistics but result is the same or similar. Other tables I have
> > have
> > 0.0% Fragmentation.
> >
> > Thanks for any help.
>
>|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have have
> 0.0% Fragmentation.
> Thanks for any help.|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
> DXC,
> You should not worry about fragmentation on a table with only 1,964 records.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
> > SQL Server 2005 SP2.
> >
> > I have a table with 1964 rows of data in it. I have a primary key and 4
> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> > column per index) and the other 2 indexes are on the int column (Again 1
> > column per index).
> >
> > The problem is, when I go to "Properties" then select the "fragmentation"
> > of the indexes, for the first index (varchar(80)) I have;
> >
> > Page fullness: 99.72%
> > Total Fragmentation: 85.71%
> >
> > Second index (varchar(80)) I have;
> >
> > Page fullness: 86.72%
> > Total Fragmentation: 87.50%
> >
> > The third index (int column)
> >
> > Page fullness: 88.95%
> > Total Fragmentation: 66.67%
> >
> > The fourth index (int column)
> >
> > Page fullness: 84.90%
> > Total Fragmentation: 75.00%
> >
> >
> > I have re-created the table in another database and add the indexes but the
> > similar result. Why do I have the fragmentation on the indexes ?. Is it
> > because of the data type ?. I also tried drop-recreate, rebuild indexes and
> > update statistics but result is the same or similar. Other tables I have have
> > 0.0% Fragmentation.
> >
> > Thanks for any help.|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
>> 1) how much free space is in the database? You need contiguous free
>> space
>> for indexes to be laid down contiguously during their creation or defrag
>> processes. Double the size of the database if possible then drop and
>> create
>> the indexes and see what you get.
>> 2) How did you populate the table in the other database? INSERT scripts?
>> If so, that could be the reason for fragmentation. Also, did you update
>> the
>> fields at all after they were in place? That too can lead to
>> fragmentation.
>> 3) what order did you create the indexes in on the second database?
>> --
>> Kevin G. Boles
>> TheSQLGuru
>> Indicium Resources, Inc.
>> kgboles a earthlink dt net
>>
>> "DXC" <DXC@.discussions.microsoft.com> wrote in message
>> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>> > SQL Server 2005 SP2.
>> >
>> > I have a table with 1964 rows of data in it. I have a primary key and 4
>> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column
>> > (1
>> > column per index) and the other 2 indexes are on the int column (Again
>> > 1
>> > column per index).
>> >
>> > The problem is, when I go to "Properties" then select the
>> > "fragmentation"
>> > of the indexes, for the first index (varchar(80)) I have;
>> >
>> > Page fullness: 99.72%
>> > Total Fragmentation: 85.71%
>> >
>> > Second index (varchar(80)) I have;
>> >
>> > Page fullness: 86.72%
>> > Total Fragmentation: 87.50%
>> >
>> > The third index (int column)
>> >
>> > Page fullness: 88.95%
>> > Total Fragmentation: 66.67%
>> >
>> > The fourth index (int column)
>> >
>> > Page fullness: 84.90%
>> > Total Fragmentation: 75.00%
>> >
>> >
>> > I have re-created the table in another database and add the indexes but
>> > the
>> > similar result. Why do I have the fragmentation on the indexes ?. Is it
>> > because of the data type ?. I also tried drop-recreate, rebuild indexes
>> > and
>> > update statistics but result is the same or similar. Other tables I
>> > have
>> > have
>> > 0.0% Fragmentation.
>> >
>> > Thanks for any help.
>>
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have have
0.0% Fragmentation.
Thanks for any help.1) how much free space is in the database? You need contiguous free space
for indexes to be laid down contiguously during their creation or defrag
processes. Double the size of the database if possible then drop and create
the indexes and see what you get.
2) How did you populate the table in the other database? INSERT scripts?
If so, that could be the reason for fragmentation. Also, did you update the
fields at all after they were in place? That too can lead to fragmentation.
3) what order did you create the indexes in on the second database?
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but
> the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes
> and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.|||The table is so small that the reported fragmentation will make no
difference to performance.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
SQL Server 2005 SP2.
I have a table with 1964 rows of data in it. I have a primary key and 4
non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
column per index) and the other 2 indexes are on the int column (Again 1
column per index).
The problem is, when I go to "Properties" then select the "fragmentation"
of the indexes, for the first index (varchar(80)) I have;
Page fullness: 99.72%
Total Fragmentation: 85.71%
Second index (varchar(80)) I have;
Page fullness: 86.72%
Total Fragmentation: 87.50%
The third index (int column)
Page fullness: 88.95%
Total Fragmentation: 66.67%
The fourth index (int column)
Page fullness: 84.90%
Total Fragmentation: 75.00%
I have re-created the table in another database and add the indexes but the
similar result. Why do I have the fragmentation on the indexes ?. Is it
because of the data type ?. I also tried drop-recreate, rebuild indexes and
update statistics but result is the same or similar. Other tables I have
have
0.0% Fragmentation.
Thanks for any help.|||1) Total space usage: 2,888.69 MB
Data Files Space Usage: 618.19 MB
Transaction Log Space Usage: 2,270.50 MB
Both data and log files set to 10% file growth and Unrestricted File Growth.
2) I have created the table from DDL (Without Primary key and indexes). I
have not updates the fields after the data import. Just select data from the
table.
3) (From script) Created the primary key first, then index 1 and 2 which are
the varchar(80) columns then the other 2 int columns.
"TheSQLGuru" wrote:
> 1) how much free space is in the database? You need contiguous free space
> for indexes to be laid down contiguously during their creation or defrag
> processes. Double the size of the database if possible then drop and create
> the indexes and see what you get.
> 2) How did you populate the table in the other database? INSERT scripts?
> If so, that could be the reason for fragmentation. Also, did you update the
> fields at all after they were in place? That too can lead to fragmentation.
> 3) what order did you create the indexes in on the second database?
> --
> Kevin G. Boles
> TheSQLGuru
> Indicium Resources, Inc.
> kgboles a earthlink dt net
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> > SQL Server 2005 SP2.
> >
> > I have a table with 1964 rows of data in it. I have a primary key and 4
> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> > column per index) and the other 2 indexes are on the int column (Again 1
> > column per index).
> >
> > The problem is, when I go to "Properties" then select the "fragmentation"
> > of the indexes, for the first index (varchar(80)) I have;
> >
> > Page fullness: 99.72%
> > Total Fragmentation: 85.71%
> >
> > Second index (varchar(80)) I have;
> >
> > Page fullness: 86.72%
> > Total Fragmentation: 87.50%
> >
> > The third index (int column)
> >
> > Page fullness: 88.95%
> > Total Fragmentation: 66.67%
> >
> > The fourth index (int column)
> >
> > Page fullness: 84.90%
> > Total Fragmentation: 75.00%
> >
> >
> > I have re-created the table in another database and add the indexes but
> > the
> > similar result. Why do I have the fragmentation on the indexes ?. Is it
> > because of the data type ?. I also tried drop-recreate, rebuild indexes
> > and
> > update statistics but result is the same or similar. Other tables I have
> > have
> > 0.0% Fragmentation.
> >
> > Thanks for any help.
>
>|||DXC,
You should not worry about fragmentation on a table with only 1,964 records.
One recommendation is to ignore fragmentation on indexes with less than
1,000 pages, as shown by dbcc showcontig.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"DXC" wrote:
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have have
> 0.0% Fragmentation.
> Thanks for any help.|||Yes but why would it show some 87.00% fragmentation ?. By the way, the
primary key column (int) has fragmentation at 0.0%.
"Tom Moreau" wrote:
> The table is so small that the reported fragmentation will make no
> difference to performance.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
> SQL Server MVP
> Toronto, ON Canada
> https://mvp.support.microsoft.com/profile/Tom.Moreau
>
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
> SQL Server 2005 SP2.
> I have a table with 1964 rows of data in it. I have a primary key and 4
> non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> column per index) and the other 2 indexes are on the int column (Again 1
> column per index).
> The problem is, when I go to "Properties" then select the "fragmentation"
> of the indexes, for the first index (varchar(80)) I have;
> Page fullness: 99.72%
> Total Fragmentation: 85.71%
> Second index (varchar(80)) I have;
> Page fullness: 86.72%
> Total Fragmentation: 87.50%
> The third index (int column)
> Page fullness: 88.95%
> Total Fragmentation: 66.67%
> The fourth index (int column)
> Page fullness: 84.90%
> Total Fragmentation: 75.00%
>
> I have re-created the table in another database and add the indexes but the
> similar result. Why do I have the fragmentation on the indexes ?. Is it
> because of the data type ?. I also tried drop-recreate, rebuild indexes and
> update statistics but result is the same or similar. Other tables I have
> have
> 0.0% Fragmentation.
> Thanks for any help.
>|||Yes..........This is what shows after the DBCC SHOWCONTIG but
fragmentation on the index properties shows something else.........Thanks.
DBCC SHOWCONTIG scanning 'customerinfo' table...
Table: 'customerinfo' (1288391659); index ID: 1, database ID: 5
TABLE level scan performed.
- Pages Scanned........................: 94
- Extents Scanned.......................: 12
- Extent Switches.......................: 11
- Avg. Pages per Extent..................: 7.8
- Scan Density [Best Count:Actual Count]......: 100.00% [12:12]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 0.00%
- Avg. Bytes Free per Page................: 265.5
- Avg. Page Density (full)................: 96.72%
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
"Ben Nevarez" wrote:
> DXC,
> You should not worry about fragmentation on a table with only 1,964 records.
> One recommendation is to ignore fragmentation on indexes with less than
> 1,000 pages, as shown by dbcc showcontig.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "DXC" wrote:
> > SQL Server 2005 SP2.
> >
> > I have a table with 1964 rows of data in it. I have a primary key and 4
> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column (1
> > column per index) and the other 2 indexes are on the int column (Again 1
> > column per index).
> >
> > The problem is, when I go to "Properties" then select the "fragmentation"
> > of the indexes, for the first index (varchar(80)) I have;
> >
> > Page fullness: 99.72%
> > Total Fragmentation: 85.71%
> >
> > Second index (varchar(80)) I have;
> >
> > Page fullness: 86.72%
> > Total Fragmentation: 87.50%
> >
> > The third index (int column)
> >
> > Page fullness: 88.95%
> > Total Fragmentation: 66.67%
> >
> > The fourth index (int column)
> >
> > Page fullness: 84.90%
> > Total Fragmentation: 75.00%
> >
> >
> > I have re-created the table in another database and add the indexes but the
> > similar result. Why do I have the fragmentation on the indexes ?. Is it
> > because of the data type ?. I also tried drop-recreate, rebuild indexes and
> > update statistics but result is the same or similar. Other tables I have have
> > 0.0% Fragmentation.
> >
> > Thanks for any help.|||Your output doesn't reveal how much actual data is being used in the
database, just that 618MB is allocated.
Your output also reveals that you probably have your database set to FULL
recovery mode but are not doing transaction log backups. If so your tlog
will continue to grow until it fills up the disk it is on, at which point
your database activity will come to a grinding halt. :-)
As others pointed out, fragmentation on a table with 2000 rows is pretty
much a non-issue from a performance standpoint.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
kgboles a earthlink dt net
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:51C396D7-ECE8-4588-91F7-E078620A481E@.microsoft.com...
> 1) Total space usage: 2,888.69 MB
> Data Files Space Usage: 618.19 MB
> Transaction Log Space Usage: 2,270.50 MB
> Both data and log files set to 10% file growth and Unrestricted File
> Growth.
> 2) I have created the table from DDL (Without Primary key and indexes). I
> have not updates the fields after the data import. Just select data from
> the
> table.
> 3) (From script) Created the primary key first, then index 1 and 2 which
> are
> the varchar(80) columns then the other 2 int columns.
>
>
> "TheSQLGuru" wrote:
>> 1) how much free space is in the database? You need contiguous free
>> space
>> for indexes to be laid down contiguously during their creation or defrag
>> processes. Double the size of the database if possible then drop and
>> create
>> the indexes and see what you get.
>> 2) How did you populate the table in the other database? INSERT scripts?
>> If so, that could be the reason for fragmentation. Also, did you update
>> the
>> fields at all after they were in place? That too can lead to
>> fragmentation.
>> 3) what order did you create the indexes in on the second database?
>> --
>> Kevin G. Boles
>> TheSQLGuru
>> Indicium Resources, Inc.
>> kgboles a earthlink dt net
>>
>> "DXC" <DXC@.discussions.microsoft.com> wrote in message
>> news:88BD8A7B-FA17-48CB-A68A-F8E0E6293603@.microsoft.com...
>> > SQL Server 2005 SP2.
>> >
>> > I have a table with 1964 rows of data in it. I have a primary key and 4
>> > non-clustered indexes on it. 2 of the indexes on a varchar(80) column
>> > (1
>> > column per index) and the other 2 indexes are on the int column (Again
>> > 1
>> > column per index).
>> >
>> > The problem is, when I go to "Properties" then select the
>> > "fragmentation"
>> > of the indexes, for the first index (varchar(80)) I have;
>> >
>> > Page fullness: 99.72%
>> > Total Fragmentation: 85.71%
>> >
>> > Second index (varchar(80)) I have;
>> >
>> > Page fullness: 86.72%
>> > Total Fragmentation: 87.50%
>> >
>> > The third index (int column)
>> >
>> > Page fullness: 88.95%
>> > Total Fragmentation: 66.67%
>> >
>> > The fourth index (int column)
>> >
>> > Page fullness: 84.90%
>> > Total Fragmentation: 75.00%
>> >
>> >
>> > I have re-created the table in another database and add the indexes but
>> > the
>> > similar result. Why do I have the fragmentation on the indexes ?. Is it
>> > because of the data type ?. I also tried drop-recreate, rebuild indexes
>> > and
>> > update statistics but result is the same or similar. Other tables I
>> > have
>> > have
>> > 0.0% Fragmentation.
>> >
>> > Thanks for any help.
>>
Subscribe to:
Posts (Atom)