View Single Post
Old 09-01-2007, 03:04 PM  
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
Quote:
Originally Posted by GrouchyAdmin View Post
Let me guess: Drop primary index, recreate primary index with a numeric automatic increment?

I've seen that, before. The best part was that these ids were being utilized rather than a UUID or even name based key, so rebuilding the indeces to use the numerics (since the software was not to be rewritten) ended up being one hell of a task of data entry.
Actually, that particular instance was because we had just finished building a custom reporting modual for sales that allowed them to search, sort and display their order file, which is actually a very complex set of data spanning most of the larger DB tables, in any manner they wanted to. So people would be running sales reports that would take an hour to generate almost. This is on an MS SQL server which of course doesn't create a "lock" when data is being read, but simply delays writes during the process without a formal lock.

What was required was by looking at a week's worth of SQL logs, figuring out and building up to 10 field indeces. In short, a fucking disaster. In the end I ended up getting another giant quad Xeon server and one way replicating data to it making it a dedicated reporting DB. Of course that brings up the problem of different indeces on different servers for the same DB, but that's another story.
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote