Cluster sind in MySQL seit der Version 5.0 möglich und werden in einer Shared-Nothing-Architektur betrieben. Das bedeutet, dass jeder Knoten mit seiner eigenen Hardware ausgestattet und kein bestimmter Knoten notwendig ist, um eine Verbindung zur Datenbank herzustellen, denn jeder Knoten verfügt über eine Kopie des Datenbankmanagementsystems und somit ist es möglich Aufgaben an andere, weniger ausgelastete Knoten zu übergeben.
In short, we’re running MySQL 5.0.45 on RedHat Enterprise Linux 5 (I know, I know…RedHat and MySQL 5.0…boo…but it’s okay). We’re required to replicate our production database to a secondary machine for backup purposes. This way, if our production server dies, we can manually failover to the slave (once we enable writes to it, of course), then swap the two back once the production server is back up.
Harry ist da. Harry hat sich in die Beta-Version von PHP 5.3 eingeschlichen. Es ist der sprichwörtliche Harry, der immer Ärger macht: seit PHP 5.3 kann ext/mysqli Persistente Verbindungen aufbauen.
Als Persistente Verbindungen werden Ressourcen bezeichnet, die über die Dauer einer Webanfrage hinaus zur Verfügung stehen. Ressourcen deren Auf- und Abbau besonders rechnen- oder speicherintensiv ist, sind ideale Kandidaten für Persistente Verbindungen. Persistente Verbindungen stehen jedoch nicht immer zur Verfügung.
These days I'm working with a customer who has an application based entirely on stored routines on MySQL side. Even though I haven't worked much with stored procedures, I though it's going to be a piece of cake. In the end - it was, but there's a catch.
My initial idea was - I'll just analyze queries in the slow query log generated by our mysql build running with long_query_time=0, get the slowest ones and work on them. It wasn't really all the way I expected..
MySQL is the world’s most popular open source relational database management system (RDBMS). As a result, over ten million installations are spread around the globe. Nevertheless, in reality only a small percentage of those are actually high performance, optimized, and tuned servers. This four-part article series targets the MySQL database and system administrators, covering various strategies to help benchmark and optimize databases, and tune servers to yield an outstanding performance.
You are reading the first segment of this multi-part series. In this part we will first present the importance of benchmarking and then discuss a few techniques for benchmarking MySQL servers. It is important to understand the basics that lie behind benchmarking and stress testing, the distinctions between each, and when we should use which. Ultimately, I will present the tools necessary for accomplishing these tasks.
Ever wondered what your PHP application and MySQL actually do? An experimental mysqlnd branch will give you full access to the network communication stream. Using a custom PHP stream filter you can then intercept the communication
Thanks to everyone who attended the performance coding webinar today. I think there were about 250 people online, which is a great turnout! Sorry for dropping off about fifteen minutes into the webinar — that'll teach me to use Skype for presenting!
There were a bunch of questions from attendees and I have tried to quote them and answer to the best of my knowledge below. They are in no particular order, and where possible, I refer to the slide where I think the question referred to. Happy tuning and coding!
A lot of you may already know this, but I am willing to bet there are more that don’t. I’m talking about the tee command in the bash shell, and in MySQL. For our purposes, we’ll talk about the tee command in MySQL.
Problem: You have a series of SQL statements whose results take up a few screens worth of output, and you need to take this output and send it to someone else (A DBA, MySQL Support, your mentor). You could just do a copy/paste from your terminal, but what if you realized in the end that your scroll back buffer isn’t as large as you thought it was?
Have you ever been annoyed about the input and output binding that is part of Prepared Statements? Prepared Statements have their room in PHP and MySQL[i] for some good reasons. Though, I recall that I didn’t like the output binding when I tried them for the first time. I wanted the good old mysqli_fetch_assoc() to be available. Last year in November someone, I think it was Lukas (but don’t blame me, if I’m wrong), suggested to implement mysqli_stmt_get_results() with mysqlnd.
By help of the new function, you can create a mysqli_result object from a statement that returns data (SELECT and other - version dependent!). Then you can use the mysqli_result object to process the returned data: fetch results, access meta data - all you can also do using a mysqli_result object returned by mysqli_query()
Now that you can load an engine, we are going to look at reading data. For this we will need to implement three methods.








