What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 129 Stack Exchange communities.

I'd like to read more about design decisions, optimizations, scaling techniques applied during development.

share|improve this question

4 Answers 4

up vote 7 down vote accepted

Jeff and Jarrod posted self-deprecating answers, but as an outsider, let me tell you that the database code and schema are really tight. (And I should add that has absolutely nothing to do with me, hahaha.) If you're going to scale a SQL Server database fast to a large audience at a low cost, you don't want any extraneous business logic in the database. No triggers, no UDFs, no CLR code, no record-by-record operations.

Normally when I do performance tuning for clients, I start tracing queries with a duration of more than 10 seconds. At Stack Overflow, I have to crank my filters down to 150-200 ms just to see any activity. It always gives me a grin.

Just generally speaking, application servers are cheap, and SQL Server is expensive ($5k-$25k per CPU). Even if you use open source databases, it's easier to scale application servers than it is to scale database servers. Every added web/application server is relatively easy to implement with a load balancer - every added database server, not so much. Every time you have to do anything even remotely CPU-related, do it in the web/application tier, not the database tier.

share|improve this answer
1  
Blush - You are too kind, sir! –  Jarrod Dixon Jun 29 '09 at 1:03
    
No, you're just too fast. ;-) –  Brent Ozar Jun 29 '09 at 11:58
    
But how many queries does this structure require for an average pageview? –  pestaa Jun 29 '09 at 20:06

A typical night of development:

Jeff: Let's see the latest feature.
Me/Dalgas: Here you go!
Jeff: What is that? I don't know what that's supposed to be..
Me/Dalgas: Isn't that what you wanted?
Jeff: But there's no words on it..
Me/Dalgas: Want us to redo it?
Jeff: No.. no time.. we'll do it live - DO IT LIVE.

I wouldn't have it any other way.

share|improve this answer
    
Hey, best place to test is always in production.... –  John Pirie Jun 28 '09 at 10:54
1  
Exactly - this meta site is a testament to that philosophy :) –  Jarrod Dixon Jun 28 '09 at 10:56
    
Something like this? projectcartoon.com/cartoon/2 –  Igal Tabachnik Jun 28 '09 at 10:57
    
Bwahaha, yeah, I can just imagine. –  Brent Ozar Jun 28 '09 at 12:16
    
Closed as historical interest. –  Kevin Montrose Apr 26 '12 at 1:11
    
@kevin notification received. –  Jarrod Dixon Apr 26 '12 at 1:45

You should definitely listen to the podcasts - Jeff gives away a lot of stuff in them.

share|improve this answer

share|improve this answer
    
It's funny as hell, although I'm more interested in that particular 'all-nighter'. ;) –  pestaa Jun 28 '09 at 11:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .