We have a large SQL database, and every night a copy is made. We actually work with the copy.
My question is: Why is our copy of the database fragmented? I did a brief look and discovered heavy index fragmentation in some of the indexes.
Now I know file fragmentation is a different thing, but for file fragmentation back in the old days we would sometimes just write the whole disk to tape (that's how old this method is) and then write the whole thing from tape back to disk, and that would take care of our file fragmentation (well for a week at least. Then they'd have me stay up all night Sunday night and do it again...)
So my question is, when a SQL database is copied, why aren't the fragmented indexes magically unfragmented for us?
(I don't know how the IT guys make the copy, but the database is about 73GB. We have Microsoft SQL Server, and I think it's the 2008 version.)
(Perhaps I should also ask, is there a way they could copy the database and have the indexes magically defragmented for us during the copy?)