31 Mar

MySQL queries with REGEXP

Official MySQL documentation provides information that using regular expressions is "powerful way of specifying a pattern for a complex search". Is it really such a powerful way of filtering and should be used, or is it a solution that should be avoided? As it usually happens in real life, there are many opinions and no universal answer. Unfortunately, it often turns out that the truth lies somewhere in the middle.

Read More
28 Mar

How to work with a long process list in MySQL

I am generally a big fan of command line tools. This also applies to MySQL client software such as mysql or mysqladmin. To those spoiled by graphical interfaces, working in text mode may seem crude or even difficult. But the truth is that once you get used to these tools, you will be able to accomplish many things a lot faster than with any GUI client. Of course, using text terminal, which is the environment for any command line tool, has its drawbacks and limitations. For example on a relatively busy MySQL server, every so often when you run SHOW [FULL] PROCESSLIST, which lists client threads connected to a database, you can receive an output that will be many screens long. Sometimes it might be due to the high number of established connections - each takes at least one line on the screen, or sometimes due to some longish queries spanning over multiple lines. Finding relevant information there usually isn't easy and having to scroll backwards doesn't really help. What do I do in such cases to help the workflow?

Read More
28 Mar

How to manage, scale and otherwise live with MySQL

Dear Readers, dbasquare.com is a new blog that describes various aspects related MySQL. We hope you will find this website valuable, especially as resource for database administrators, application developers and all other professionals interested in learning more about this database. We will offer free knowledge to everyone. Whether you are a MySQL newbie or a skilled DBA, you should be able to find something interesting for yourself:

Read More