Home » Performance » MySQL » query cache enhncement
query cache enhncement [message #560] Tue, 09 January 2007 11:37 Go to next message
rhuddleston  is currently offline rhuddleston
Messages: 11
Registered: August 2006
Junior Member
se that column is updated quite a lot).

The first time a member signs in, the query in the worst cases take 20s (locking the table so other queries can't run). I guess this is fair, a lot of posts and it have to count them one by one since we haven’t indexed read.

But my question is, now that the query has run, if we run the query again a minute later the query will not take a second. Even if the table is updated, so it shouldn't be the query cache. Do mysql store sub results from the count before and use that?

Let say the member signs out and don't return for a hour. Then the query will take 20s again.The question is caching. Database blocks gets cached after they are fetched from the disk and accessing them then is very quick.

Also select itself does not lock the table (I guess you're using myISAM)- it is some concurrent updates what stall everything. okey. Then we understan
Re: query cache enhncement [message #561 is a reply to message #560 ] Tue, 09 January 2007 11:42 Go to previous message
Peter  is currently offline Peter
Messages: 405
Registered: August 2006
Senior Member
Super Guru
d the magic :)

Yes its myISAM. So would it runt faster if it was an innodb table?
I guess row level locking is better. Or do you have any other engine suggested?Innodb will solve your table locking problem. Table may be larger and so slower though. We have lost data from Mysql. We are trying to reconstruct the data from Query Log. Please help usHm,

Have you lost


Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
Previous Topic:muti-key index order
Next Topic:When (not) to group indexes: multi-column primary indexes
Goto Forum:
  


Current Time: Fri Jul 10 01:19:03 EDT 2009

Total time taken to generate the page: 0.02235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.