I have long been puzzled by the speed of stackoverflow and how quickly the questions / comments load on the page. It seems that the db backend that stores all this information will be humongus ... How can I ask a question and all the related answers to download so fast?
I have never worked in a large-scale db environment before (my background is a small business business such as Access, some MySQL) ... but I would suggest that the backend db for stackoverflow (simplified) is something like two tables, bound by an indexed key, right? Something similar to:
Question table: Question_PrimaryKey | QuestionText
Answer table: Answer_PrimaryKey | Question_ForeignKey | AnswerText
(linked in Question_PrimaryKey and Question_ForeignKey).
As I understand it, a site like stackoverflow is so structured? If so, how did the answers to these questions actually get so quickly and go to the browser? (this drives me crazy because when I create small intranet sites that use Access as a backend, performance really starts to deteriorate when db grows).
Any input is appreciated. Thank you for your time!
source share