Showing entries 1 to 9
Displaying posts with tag: mysql tuning (reset)
This Week in Website Performance

This Week in Website Performance is a weekly feature of the Monitis.com blog. It summarizes recent articles about website performance. How to make yourweb site better, how to improve your users experience when they come to your website and how to optimize the overall experience. Why? Because your friends at Monitis.com care.

Improving website performance – 10 tips

Author: palepurple.

Discussed in this short article are 10 useful tips for a LAMP (Linux/apache/mySQL/PHP) based website. This is a nice round up of various tips seen in many similar articles. It’s a great way to get started if you are getting into performance optimization on this platform, or maybe it’s time to take another look to be sure things are …

[Read more]
How to Tune a MySQL Application Like a Piano

A default installation of MySQL is easy to perform, but if you really want your databases to sing, you should tune them like you would tune a piano. In MySQL tuning pertains to either the application or the database system. In this post, we cover some common tuning techniques and best practices to increase your [...] Read More

MySQL Benchmark – updates by primary vs secondary keys

(Note: when I’m talking about MySQL I usually assume InnoDB storage engine. Any other case I explicitly tell this is MyISAM or Memory etc.)

I’ve heared an interesting aproach of using Master-slave replication in MySQL.

Thesis

So the theory was that since updates by primary keys are fast and by secondary keys are slow the slave has to be queried for the primary key and then run the updates by the fetched primary keys. To make this in context and more understandable:

Original query

UPDATE table_for_test SET value_to_change = 123 WHERE cond_column_1 = 987 AND cond_column_2 > 765;

This query get splitted to two different query. First query has to be run on the slave to fetch the primary keys:

SELECT pr_id_col FROM table_for_test WHERE cond_column_1 = 987 AND cond_column_2 > 765;

When we have the values we can go to the master and update the necessary records. …

[Read more]
How to store boolean in MySQL

I always hear newer and newer exotic way to store different types of data in MySQL. People are trying to solve the problem of storing complex and not necessary strictly structured data in databases which is fine. But I never understood why to try to be tricky with the simplest datatypes. For example Booleans. You would believe it’s easy. Yes or no. But there are several different way to say in MySQL that this is a Boolean.

Possible solutions

1) The most common (consider as a best practice):

TINYINT unsigned NOT NULL

2) The trivial Boolean or Bool column type which is just a synonyms for TINYINT(1):

BOOLEAN NOT NULL DEFAULT 0

3) Declaring an enumaration with “true” and “false”:

ENUM('false', 'true') NOT NULL DEFAULT 'false'

4) The newest and weirdest I heard …

[Read more]
Book Review – Effective MySQL

Read the original article at Book Review – Effective MySQL

Effective MySQL: Optimizing SQL Statements by Ronald Bradford No Nonsense, Readable, Practical, and Compact I like that this book is small; 150 pages means you can carry it easily.  It’s also very no nonsense.  It does not dig too deeply into theory unless it directly relates to your day-to-day needs.  And those needs probably cluster [...]

For more articles like these go to iHeavy, Inc +1-212-533-6828

7 Ways to Troubleshoot MySQL

MySQL databases are great work horses of the internet.  They back tons of modern websites, from blogs and checkout carts, to huge sites like Facebook.  But these technologies don't run themselves.  When you're faced with a system that is slowing down, you'll need the right tools to diagnose and troubleshoot the problem.  MySQL has a huge community following and that means scores of great tools for your toolbox. Here are 7 ways to troubleshoot MySQL.

1. Use innotop

Innotop is a great tool for MySQL which despite the name monitors MySQL generally as well as InnoDB usage.  It's fairly easy to install, just download the perl script. Be sure to include a [client] section to your local users .my.cnf file (you have one don't you?).  Inside that section, place one line with "user=xyz" and one line with "password=abc".

If you're concerned that installing something new is too …

[Read more]
5 Ways to Boost MySQL Scalability

There are a lot of scalability challenges we see with clients over and over. The list could easily include 20, 50 or even 100 items, but we shortened it down to the biggest five issues we see.

1. Tune those queries

By far the biggest bang for your buck is query optimization. Queries can be functionally correct and meet business requirements without being stress tested for high traffic and high load. This is why we often see clients with growing pains, and scalability challenges as their site becomes more popular. This also makes sense. It wouldn't necessarily be a good use of time to tune a query for some page off in a remote corner of your site, that didn't receive real-world traffic. So some amount of reactive tuning is common and appropriate.

Enable the slow query log and watch it. Use …

[Read more]
MySQL Database Monitoring Best Practices

The MySQL database is a crucial part of a wide variety of products, particularly web applications. Naturally, it is very important to monitor the health status of MySQL.  However, there is constant disagreement on which of the many MySQL status variables provide the best overview on MySQL health status and indicate that something is not right with a server.

It certainly depends on what your application does – tuning read performance is different than optimizing write operations and everything changes when you have a cluster. The average user can use small subset of variables while advanced user want to get more detailed picture of the situation. So there cannot be one set of “magic variables” to quietly optimize every situation. However, it is possible to have a more-or-less optimal set of metrics that will allow to get a “good enough” notion about the general health status of MySQL Server.

The new white paper “ …

[Read more]
Summary of Blog Posts for Week of July 11

I hope everyone is enjoying summertime, at least in the northern hemisphere. I’m about to head out to the pool, but before I go, here is a summary of this week’s blog posts.

1. Introduction to Perl interface for Monitis API
Monitis announces a simple way to access its API through Perl, a high-level, general-purpose, interpreted, dynamic programming language. This post demonstrates some examples for using the API with Perl and describes some of the benefits of the programming language. The source can be found on our Github page.

2. 101 Tips to MySQL Tuning and Optimization

[Read more]
Showing entries 1 to 9