:( Some people use SQL Server like "Giant excel spread sheets"

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

clamum

Lifer
Feb 13, 2003
26,256
406
126
I hear ya man. And it does suck.

I'm working with a database right now that is similar to what you're describing in the OP, though it doesn't sound quite as bad. We actually had to tell them to add indexes to a bunch of tables as a query was taking like 15 minutes to run (after indexes it took roughly 20-30 seconds). Why did we have to tell them?

They didn't even know what indexes were.

/facepalm
 

DT4K

Diamond Member
Jan 21, 2002
6,944
3
81
If anyone with more than 2 years of development experience insists on the Excel style database format, they should be euthanized. If you need to denormalize your tables that much for performance reasons, you need faster hardware.

For the first statement, I'd say that should apply to anyone with any development experience at all or who has ever taken a class on database theory.

As far as denormalizing, there are valid reasons to do it. You just have to think carefully about the pros and cons. Faster hardware costs money and sometimes it's not the best solution when just a little bit of denormalization will get you what you need in terms of performance.

As an example, I work for a manufacturing company where we need to maintain traceability from each finished product serial number back through all the individual components that were used to make it. In a normalized system, we would have to take the finished product serial number, look up the serial of the item that made it, then look up the serial of the item that made that item, etc., etc. This needs to be done for every shipment and each shipment can have tens of thousands of serial numbers, each of which can have dozens of steps in the process that need to be traced back. So it can be a long process.

But by denormalizing a little and saving the needed traceability data with each serial record as it's created at each step, this makes all the data available instantly when it's needed, giving a huge performance increase.