Oct 28, 2006 |
Insight for Developers
If you’re following MySQL or PHP landscape you should have seen announcement by MySQL to develop pure PHP driver. If not – Here is FAQ . I’m to meet the team (Georg, Andrey etc) which will be developing this driver during my visit to Open Source Database Conference in November so I thought it would […]
Oct 26, 2006 |
Percona Events
I’ll have two sessions on upcoming OpenSource Database Conference in Frankfurt 6-8 November. One session will be general MySQL Performance Optimization workshop the other will be focused on Innodb architecture and optimization. If you’re visiting this event or International PHP Conference which runs parallel to this even drop me a note and we can chat. […]
Oct 16, 2006 |
Insight for DBAs
This is interesting question which I thought it would be good to write about. There are obviously benefits and drawbacks for each of methods. Smaller applications usually start with single server which has both MySQL and Web server on it. In this case it is not usually the question but once application growths larger and […]
Oct 08, 2006 |
Insight for Developers
Yesterday I had fun time repairing 1.5Tb ext3 partition, containing many millions of files. Of course it should have never happened – this was decent PowerEdge 2850 box with RAID volume, ECC memory and reliable CentOS 4.4 distribution but still it did. We had “journal failed” message in kernel log and filesystem needed to be […]
Oct 03, 2006 |
Insight for DBAs
Innodb primary key is special in many senses and I was always wondering how well MySQL is integrated with Innodb to take advantage of these special features. Lets see which things work and which things do not:
Oct 03, 2006 |
Insight for DBAs
I’ve written and spoke a lot about using short PRIMARY KEYs with Innodb tables due to the fact all other key will refer to the rows by primary key. I also recommended to use sequential primary keys so you do not end up having random primary key BTREE updates which can be very expensive. Today […]
Sep 27, 2006 |
Insight for Developers
A while back I did Cache Performance Comparison for LAMP Stack. Looking at this data you can see memcached is about 5 times as slow as APC, and this is with tests done on localhost – with network difference is going to be larger, even with fastest network. Such latency can add up especially if […]
Sep 27, 2006 |
Percona Events
When I was leaving MySQL I wrote I will be doing some Web projects on my own, besides doing MySQL Consulting. I think some people thought I am just using that as an excuse and really I will only do consulting. So I’m pretty happy to announce my first project. NNSEEK Is NewsGroup search engine, […]
Sep 22, 2006 |
Percona Events
I’m now back from EuroOSCON 2006 which was the reason I was not posting for a while. Pretty interesting event, even though it looks like it is getting less geeky compared to OSCON in US I visited two years ago – a lot of presentations now shifted to philosophical, political and business issues. I however […]
Sep 12, 2006 |
Insight for Developers
This is a pretty simple approach I often use called to optimize web application performance if problem happens with few pages. If we have “everything is slow” problem looking at slow query logs may be better start. So what could you do ? Look at the information shown on the page which comes from database. […]
Sep 08, 2006 |
Insight for DBAs
Have you ever seen index which refused to be used even if there is every reason for it to work (from the glance view):
|
mysql> explain select * from article where article_id=10; +----+-------------+---------+------+---------------+------+---------+------+-------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------+------+---------------+------+---------+------+-------+-------------+ | 1 | SIMPLE | article | ALL | PRIMARY | NULL | NULL | NULL | 93490 | Using where | +----+-------------+---------+------+---------------+------+---------+------+-------+-------------+ 1 row in set (0.00 sec) |
Why on the earth index would not be used you would think, even if MySQL is mentioning it in “possible keys” ? Should you try to force it ?
Sep 06, 2006 |
Insight for Developers
This is probably well known issue for everyone having some MySQL experience or experience with any other SQL database. Still I see this problem in many production applications so it is worth to mention it, especially as it is connected to MySQL Performance. No it might not affect MySQL Performance per say but it limits […]
Sep 04, 2006 |
Insight for DBAs
I already wrote couple of weeks ago I keep most of my systems on MySQL 4.1 still as they will not benefit from MySQL 5.0 features anyway while I do not want to likely loose a bit of performance and possibly deal with new bugs and changes introduced in MySQL 5.0 (You never know where […]
Aug 31, 2006 |
Insight for Developers
Starting MySQL 4.1, MySQL had support for what is called derived tables, inline views or basically subselects in the from clause. In MySQL 5.0 support for views was added. These features are quite related to each other but how do they compare in terms of performance ?
Aug 23, 2006 |
Benchmarks
Whenever I see benchmark results I try to understand if it is technical benchmark – made by people seeking the truth or it is done by Marketing department to wash your brains. Watch out. Whenever you treat marketing benchmarks as technical ones, you make make wrong decision. Take a look at MySQL 5.0 Benchmarks Whitepaper […]
Aug 21, 2006 |
Insight for DBAs
If someone asks me about MySQL Backup advice my first question would be if they have LVM installed or have some systems with similar features set for other operation systems. Veritas File System can do it for Solaris. Most SAN systems would work as well. What is really needed is ability to create atomic snapshot […]
Aug 18, 2006 |
Percona Events
As I already announced last week I started MySQL Performance Forums project focusing on MySQL Performance discussions as it names says. I spend planty of time replying questions and thought it would be good idea to provide weekly overviews of most interesting topic discussed. Here is the list for last week: Ways to perform full […]
Aug 17, 2006 |
Insight for DBAs
About every second application I look at has some tables which have redundant or duplicate indexes so its the time to speak about these a bit. So what is duplicate index ? This is when table has multiple indexes defined on the same columns. Sometimes it is indexes with different names, sometimes it is different […]
Aug 14, 2006 |
Insight for Developers
Loose Index Scan with Double IN Few days ago I wrote an article about using UNION to implement loose index scan. First I should mention double IN also works same way so you do not have to use the union. So changing query to:
|
mysql> SELECT sql_no_cache name FROM people WHERE age in(18,19,20) AND zip IN (12345,12346, 12347); +----------------------------------+ | name | +----------------------------------+ | ed4481336eb9adca222fd404fa15658e | | 888ba838661aff00bbbce114a2a22423 | +----------------------------------+ 2 rows in set (0.00 sec) mysql> explain SELECT sql_no_cache name FROM people WHERE age in(18,19,20) AND zip IN (12345,12346, 12347); +----+-------------+--------+-------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+--------+-------+---------------+------+---------+------+------+-------------+ | 1 | SIMPLE | people | range | age | age | 4 | NULL | 9 | Using where | +----+-------------+--------+-------+---------------+------+---------+------+------+-------------+ 1 row in set (0.00 sec) |
So as you see there are really different types of […]
Aug 11, 2006 |
Insight for Developers
Article about database design problems is being discussed by Kristian. Both article itself and responce cause mixed feellings so I decided it is worth commenting: 1. Using mysql_* functions directly This is probably bad but I do not like solutions proposed by original article ether. PEAR is slow as well as other complex conectors. I […]