Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
> UPDATE jos_content SET hits = ( hits + 1 ) WHERE id='123'
> 
> The log says this took 7 seconds.  There's an index on "id".  There are only 
> 400 or so records in the whole table.  It's not like there are a million 
> records and no index.
> 
> Is there ANY rational reason this query would EVER take 7 seconds to execute?

It could be worth either doing an analyze 
(http://dev.mysql.com/doc/refman/5.0/en/analyze-table.html) or possibly 
doing a dump/restore - in case there is lots of "bloat" either in the 
indexes or tables. Normally you wouldn't see this with mysql (especially 
myisam) but it's worth a shot.

What other queries are running at the same time? (use 'show processlist' 
inside mysql to get a list), maybe you're getting lots of hits to the 
same tables and myisam is locking everything, and it's time to convert 
to innodb.


-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.