I've got a SQL Server 2000 database serving a classic ASP web application. The performance of the database keeps nosediving and I can't figure out why. When preforming normally, running a known query will return a result set in 5 seconds. After time, or more commonly after a big data import (the system allows import from CSV files), the query can take more than 20 seconds to return the same data. If I go and manually clean out all the data from the import (so the tables have the same numbers of rows as before) the query will still run at >20secs. I've also tried rebuilding the indexes and defragmenting the data disk, and running the maintenance tasks to compact the log files. Performance remains in the 'sucks' region. However, if I detach the database and immediately reattach it, everything perks up and the query runs in 5 seconds again. I'm not entirely sure what happens during the detach/attach process. Does anyone here have any ideas as to what might be fixing the issue (and therefore any clues to the cause)?