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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
kate_r's avatar
107
kate_r
asked 11 years ago
Evgeny's avatar
13.2k
Evgeny
updated 11 years ago

Comments

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago, updated 11 years ago
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 (11 years ago)
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 (11 years ago)
see more comments