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

2 comments

Jarkko Laine
 

Interesting Could you share some details? <p> Thanks,
Read more
Read less
  Cancel
Lars Pind
 

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.
Read more
Read less
  Cancel

Leave a comment