Lars Pind

internet software, coaching, and entrepreneurship

Lars Pind - internet software, coaching, and entrepreneurship
Check out Coach TV, my video blog on happiness and personal development for geeks.

New and improved performance

October 06, 2002 · 2 comments

Bugger. I’ve been annoyed with how slow my front page was for so long, but I never took the time to do something about it. Well, I did just now. Turns out it was one stupid query which took almost 8 seconds to process. All I had to do was create an index. So now it’s back up to tolerable speed. Hooray! :)

blog comments powered by Disqus

2 responses so far ↓

  • 1 Jarkko Laine // Oct 07, 2002 at 06:47 PM

    Interesting Could you share some details?

    Thanks,

  • 2 Lars Pind // Oct 07, 2002 at 07:11 PM

    Nothing too interesting I have a stupid table that logs hits to my photos and pages, because I wanted to play around with doing things like "most popular ...", and "people who liked this photo also liked this ..." (ratings).

    Anyway, the fix was to create an index on the article_id/image_id column (on_what_id) of the table counting hits. Counting those hits for just the 5 most recent articles listed on the front page took about 8 seconds.