First time here? Check out the FAQ!
0

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

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

kate_r's avatar
107
kate_r
asked 2013-06-07 12:07:21 -0500
Evgeny's avatar
13.2k
Evgeny
updated 2013-06-07 12:21:59 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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.

Evgeny's avatar
13.2k
Evgeny
answered 2013-06-07 12:21:13 -0500, updated 2013-06-07 12:21:37 -0500
edit flag offensive 0 remove flag delete link

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's avatar kate_r (2013-06-07 12:30:59 -0500) 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's avatar Evgeny (2013-06-07 12:37:25 -0500) edit
add a comment see more comments