Hacker News new | past | comments | ask | show | jobs | submit login
Make Your Site Run 10 Times Faster (highscalability.com)
22 points by known on Oct 2, 2008 | hide | past | favorite | 7 comments



"Rookie database administrators are taught in school to always keep their databases normalized. ... The 'database ninja' way to handle this scenario, is to duplicate these two pieces of frequently accessed data..."

Completely wrong. Normalization is a foundational principle of relational database design. Review the ACID properties and any of the textbooks a "rookie" DBA read in school and you'll find that optimizing performance for a web site is NOT a consideration in database design.

The original article does not even describe denormalization, which has a real meaning and real applications for data warehousing and OLAP -- non-transactional databases used for reporting and data mining. It describes caching, and an expensive and error-prone way to maintain the cache in real time. When rookies do this out of ignorance the database is called un-normalized; doing it intentionally is almost always a bad idea that will come back to bite.

The notion that normalized data slows query performance has been debunked so many times that there's a whole literature on just that subject. It's a shame that so many database "ninjas" cut their teeth on MySQL, and think that the tricks required to get a low-end RDBMS to keep up with a web server when it's ruanning an interpreted language and SQL written by amateurs will apply to relational databases in general. If a serious DBA trained in Oracle, Sybase, DB/2, or SQL Server were to follow your advice they would be sent back to school.

I tried to post this comment on the original author's site but his forum software thinks my browser has Javascript disabled. I guess another way to make your site 10x faster is to eliminate important functionality.


The real speed problem is using general purpose web server like apache. What you need to do is write your own custom webserver for each site in assembler. That way most, if not all, the site can be served directly from server in ram without have to resort to disk reads.


"... in assembler." Or Forth!


not too impressed with this article..

When was client side javascript a server side performance bottleneck? On the contrary farm out as much work as possible on the client instead of doing it at the server, like sorting tables and stuff. Things like javascript tabs are also worth lot in terms of performance, serve one page that contains the content of 10 pages = less requests to the server.

eAccelerator = old skool, why not APC which is the php opcode cache favoured by Rasmus Lerdorf?

Why no advice on using a cache in apache or in front of apache to serve static stuff directly from memory?


I agree with you, I noticed the No more than two queries per page.

Even better tip - just make a static page and your site will be so much faster...


Trash.


The secret to high-scalability: Make a no complexity site which does near no more than a static page, denormalize your DB because even at 2 queries max per request MySQL dries up because it can't do hash-joins, but damnit if you are going to switch to a real DB and implement caching on top of that blah blah blah.

This was almost, but not quite, entirely different from trash advice.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: