Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 121 to 130 of 33352 10 Older Entries
HAProxy: Give me some logs on CentOS 6.5!
+0 Vote Up -0Vote Down

HAProxy is frequently used as a load-balancer in front of a Galera cluster. While diagnosing an issue with HAProxy configuration, I realized that logging doesn’t work out of the box on CentOS 6.5. Here is a simple recipe to fix the issue.

If you look at the top of /etc/haproxy/haproxy.cfg, you will see something like:

global
    log         127.0.0.1 local2
[...]

This means that HAProxy will send its messages to rsyslog on 127.0.0.1. But by default, rsyslog doesn’t listen on any address, hence the issue.

Let’s edit /etc/rsyslog.conf and uncomment these lines:

$ModLoad imudp
$UDPServerRun 514

This will make rsyslog listen on UDP port 514 for all IP

  [Read more...]
Generated Columns in MySQL 5.7.5
Employee_Team +0 Vote Up -1Vote Down

Generated Columns is a new feature available in the latest lab release. This work is based on a contribution by Andrey Zhakov. Thanks, Andrey! The Optimizer team modified it to follow the current MySQL design, and to lift a number of limitations.

The syntax is:

<type>   [ GENERATED ALWAYS ]   AS   ( <expression> )   [ VIRTUAL|STORED ]
[ UNIQUE [KEY] ]   [ [PRIMARY] KEY ]   [ NOT NULL ]   [ COMMENT <text> ]

There are two kinds of Generated Columns: virtual (default) and stored. Virtual means that the column will be calculated on the fly when a record is read from a table. Stored means that


  [Read more...]
Low-concurrency performance for point lookups: MySQL 5.7.5 vs previous releases
+1 Vote Up -0Vote Down
My series on low-concurrency performance continues. Previously I compared results for sql-bench and here I use point queries run by mysqlslap for 1, 4 and 32 concurrent clients to compare MySQL versions 5.0, 5.1, 5.5, 5.6 and 5.7 for the InnoDB and Heap storage engines. All binaries (mysqlslap, mysqld) ran on the same host. The test table has 64,000 rows. The test binaries are described here. Compared to MySQL 5.0.85, for the workload with 1 thread:

  • Response time for 5.7.5 is 1.47X worse without the PS and 1.51X worse with the PS
  • Response time for 5.6.21 is 1.37X worse without


  [Read more...]
libAttachSQL Benchmarks With Sysbench
+0 Vote Up -0Vote Down
libAttachSQL Benchmarks With Sysbench

This week I have been spending a little bit of time creating a module for Sysbench so that it can use libAttachSQL as a database driver. The reason for doing this is twofold:

  • Brian (my boss at HP’s Advanced Technology Group) said now would be a good time to benchmark libAttachSQL
  • I really needed more than a few basic queries to shake out bugs in the library, and a benchmark is a good way to shove a few million through it
  • On the bug front, it did find a total of 5 bugs, a couple of them serious. Which is great, the more testing and bug finding the better. These have all been fixed in GitHub and will be part of the upcoming

      [Read more...]
    Dynamic Columns Tutorial – Part 1: Introduction
    +0 Vote Up -0Vote Down
    Thu, 2014-10-02 19:21maxmether

    For certain situations, the static structure of tables in a relational database can be very limited. Each column is statically defined, has a pre-defined type and you can only enter a value of that type into the column.You can be creative and list multiple values in one column, but then those values are not generally easily accessed and manipulated with other functions. You have to use an API or contortions of a function like SUBSTRING() to pull out a value you want. Even then, you have to know what is contained in the column to be able to manipulate it properly. These methods can require too much manual intervention to assess and access the data contained in the column.

    If you want to add columns as the information stored in your tables grows and your needs change you need to do fairly expensive ALTER TABLE operations. These have

      [Read more...]
    How to get MySQL 5.6 parallel replication and Percona XtraBackup to play nice together
    +1 Vote Up -0Vote Down
    Thu, 2014-10-02 17:25kolbekegel

    MySQL 5.6 introduces a new "multi-threaded slave" feature (aka "parallel replication") that turns the "slave SQL thread" into a number of distinct threads that each apply events to different schemas. This means that separate slave "worker threads" will be executing different positions in the slave's relay log (corresponding, of course, to different positions in the master's binary log) and that the Relay_Master_Log_File and Exec_Master_Log_Pos values in SHOW SLAVE STATUS output are no longer an accurate indicator of the current position of the slave. This causes severe problems if using Percona XtraBackup/innobackupex with the --slave-info option to get a backup that can be used to seed a new slave. Let's take a look at how multi-threaded slave works

      [Read more...]
    InnoDB Native Partitioning – Early Access
    Employee_Team +0 Vote Up -0Vote Down

    The InnoDB labs release includes a snapshot of the InnoDB Native Partitioning feature.

    To better understand why we implemented this, we need to start with some background on tables, storage engines, and handlers. In MySQL an open instance of a table has a handler object as an interface to the table’s storage engine. For a partitioned table there is a main table handler that implements the partitioning feature, but for storage, each partition has its own handler. This worked fairly well, but the more partitions you had the more overhead from the per partition handlers. So to remove this overhead for partitioned InnoDB tables we’re introducing Native Partitioning support! This means a new InnoDB partitioning aware handler, so that we have a single handler object for a partitioned table and not one handler object per

      [Read more...]
    Visualizing the impact of ordered vs. random index insertion in InnoDB
    +3 Vote Up -0Vote Down

    [This post refers to innodb_ruby version 0.9.11 as of October 2, 2014.]

    Many DBAs know that building indexes in “random” order (or really any order that greatly differs from ordered by key) can be much less efficient. However, it’s often hard to really understand why that is. With the “-illustrate” visualization modes available in innodb_ruby, it’s possible to quite easily visualize the structure of indexes. The space-lsn-age-illustrate mode to innodb_space allows visualization of all pages in a space file by “LSN age”, generating something like a heatmap of the space file based on how recently each page was modified.

    (Note that a

      [Read more...]
    Single thread performance in MySQL 5.7.5 versus older releases via sql-bench
    +0 Vote Up -0Vote Down
    MySQL 5.7 does much better on benchmarks with high-concurrency. It might do worse on benchmarks with low-concurrency. I am not surprised as this has been true across many releases. The question is whether anything can be done to reverse it. When testing 5.6 I filed bugs 68825 and 69236 for this problem. Maybe it is time for new bug reports. I measure the following from sysbench for InnoDB but must add the disclaimer that I have yet to explain these results and I am wary of unexplained benchmark results. And also note that these overheads are for the sql-bench workload. Your workload might have a smaller overhead. By the same token, if you have less overhead when running TPC-D queries that  [Read more...]
    Free eBook: Configuring MySQL for Performance
    +0 Vote Up -0Vote Down

    Have you donwloaded our latest eBook, Configuring MySQL for Performance? It offers simple advice on configuring the most important settings to maximize your MySQL performance.

    Below are a couple tidbits:

    The Default Storage Engine

    The default_storage_engine setting is the engine used for tables that don’t specify an engine explicitly. This used to be MyISAM, but it’s changed to InnoDB more recently. This is a good thing; it’s the engine we’ve suggested as default for most use cases for years. Just check to ensure this is set as you desire. If you don’t know what engine to use, the right answer is probably InnoDB.

    The Query Cache

    The query cache (variables whose names begin query_cache ) should generally be disabled, unless you’re quite familiar with MySQL and its inner workings and know that it’ll help on your

      [Read more...]
    10 Newer Entries Showing entries 121 to 130 of 33352 10 Older Entries

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.