Hi all!
First of all, congratulations for the Web
I think I’m having performance problems with a very small MyIsam table but I’m not sure if it’s a configuration/design/hardware problem or have I reached the limit of MySQL.
The table is very simple and small (about 20000 rows). It contains the price and a short description of some products, and a timestamp indicating the moment of the insert:
CREATE TABLE products (
id int(11) NOT NULL default ‘0’,
timestamp int(11) NOT NULL default ‘0’,
price int(11) NOT NULL default ‘0’,
description varchar(256) NOT NULL default ‘’,
KEY idx_products_id
(id
),
KEY idx_products_timestamp
(timestamp
),
KEY idx_products_price
(price
)
) ENGINE=MyISAM
The database host is Intel Xeon 2.80GHz-4Gb RAM-Linux (kernel 2.6.15) using my-huge.cnf, and I’m querying the database through a separate Apache+PHP host using persistent connections.
The query is also very simple:
SELECT * FROM products WHERE price > $value1 AND an_precio < $value2 ORDER BY (timestamp) DESC LIMIT 100;
With random $value1 and $value2, mytop shows only 50 qps (no inserts or updates simultaneously, just this query).
After reading some useful posts on the Web, I removed idx_products_price index ( IGNORE INDEX(idx_products_price) ). This modification increases the qps to 350 (is normal that increase with only ignoring that index??), but I think the value of 350 qps is still low. My question is if is it a performance problem or have I reached the limit of this MySQL configuration and 350 qps is a good value?
Thanks in advance for your comments.
Regards,
Nacho.