Ask Your Question
0

How come the query cache isn't read in new sessions?

asked 2013-06-07 12:07:21 -0600

kate_r gravatar image

updated 2013-06-07 12:21:59 -0600

Evgeny gravatar image

Hi

How come the query to count the number of entries in askbot_thread doesn't come from MySQL's query cache in new sessions? It comes from the query cache only if the session already exists in the django_session table, but not when it's not. This is the query for computing paginator.num_pages in the readers.questions() function.

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-06-07 12:21:13 -0600

Evgeny gravatar image

updated 2013-06-07 12:21:37 -0600

Probably, something is not right in the MySQL configuration.

MySQL handles its query cache internally and this issue is not related with the Askbot code base.

edit flag offensive delete link more

Comments

Right, but how is askbot.org setup? Is the "1,689 questions" on the frontpage read from query cache or memcache? If the setup is like that in the trunk, does the setup require creating any multi columns index separately?

kate_r gravatar imagekate_r ( 2013-06-07 12:30:59 -0600 )edit
1

On this site we use locmem cache and single process. Of course it will not read all the 1K+ questions - it is just the count, delivered by a separate query. Our MySQL setup is default, no optimizations. This site is fairly low traffic so we don't need to optimize. I remember that I've set up MySQL memory cache before - by editing the my.cnf file, but don't recall the details - just have a look at the MySOL docs.

Evgeny gravatar imageEvgeny ( 2013-06-07 12:37:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-07 12:07:21 -0600

Seen: 59 times

Last updated: Jun 07 '13