New and improved performance

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! :)


Interesting Could you share some details? <p> Thanks,
By Jarkko Laine on Sun, Oct 06, 02 at 10:19 · Reply
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). <p> 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.
By Lars Pind on Sun, Oct 06, 02 at 10:19 · Reply

Leave a comment