Re: slow query on myisam table
Posted by:
Rick James
Date: March 08, 2014 12:32PM
WordPress uses about a dozen tables per "user", and puts them all in the same database. MySQL uses 3 files per MyISAM table. MySQL puts all tables of a database in a single directory, named the same as the database. In your case, that means about 25,000 files in one directory. That is serious bottleneck for any operating system. That is, your slow operations are probably due to opening the files, not to MySQL or MyISAM.
SOMEDAY WordPress WILL NOTICE THIS POOR DESIGN ! IS ANYONE LISTENING??
WordPress should
* consider other ways to store the tables/users. (Big design overhaul)
* Use InnoDB with innodb_file_per_table=OFF -- this would lead to only 1 file per table (instead of 3), and most operations would act on the already-open ibdata1. (This would be only a partial 'solution'.)
* If migrating a user is important, then file_per_table=ON would be useful, by using "transportable tablespaces", but now they would need 2 files per table, and the files would be bulky -- on the order of 1MB per user, even if the user has virtually no documents.
(Feel free to redirect your question, and my answer/rant, to some WP forum.)
-- Rick James, MySQL Geek
Subject
Views
Written By
Posted
4088
March 04, 2014 06:48AM
Re: slow query on myisam table
1822
March 08, 2014 12:32PM
1715
March 10, 2014 05:23AM
1792
March 13, 2014 08:29PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.