[Cialug] mysql database design

Matthew Nuzum newz at bearfruit.org
Thu Aug 9 11:24:00 CDT 2007


On 8/9/07, Dave J. Hala Jr. <dave at 58ghz.net> wrote:
> I really don't have to join *all* of them. I organized (grouped) the
> data and setup the tables in a way that made sense. I could do a couple
> of separate queries, but I was wondering how others dealt with this
> issue.
>
> Anyway, its a really big a report with about 50 separate data points,
> and in this case, most of them column sums.

The big talk lately (though its not new) in db query performance is
"denormalization." I say "big talk" because I've seen it discussed on
a few blogs just in the last couple days.

If I want my reports to be snappy, I sometimes set up a dedicated task
that runs as a low priority and denormalizes my data into "report
friendly" format using a single or maybe two tables. Then I run my
task at 15 min intervals. That way, when PHBs run their report, they
get it in 2.3 seconds which makes them happy and makes me look like a
god, since everyone else's reports take 90s or more. :-)
-- 
Matthew Nuzum
newz2000 on freenode


More information about the Cialug mailing list