Neuigkeiten

MySQL Cluster overview

Oli Sennhauser - Mon, 2010-03-15 14:19

This is a chaotic collection of my MySQL Cluster experience…

Table of Contents

config.ini template

A generic MySQL Cluster configuration file (config.ini) to start with. It is pretty much what the MySQL Cluster experts recommend right now:

#
# config.ini
#

# This configuration file is fore MySQL Clusters 6.2 and above...

# …

Taxonomy upgrade extras:  Mysql Cluster 

MySQL Cluster memory sizing

Oli Sennhauser - Mon, 2010-03-15 13:53

MySQL Cluster is pretty fast. The reason for this is, that it is completely memory based. Nowadays memory is still, in contrary to disk, limited to your systems. Thus, before installing a MySQL Cluster you have to calculate the amount of memory you need.

To say it in advance: You should consider to only use 64-bit Linux system with huge amount (4 - 64 GB) of RAM!

In release 5.1 MySQL Cluster became disk based. Now you have the possibility to swap out some data to disk. How much it is we will probably see a …


Taxonomy upgrade extras:  Mysql Cluster  Memory  Sizing 

MySQL hints

Oli Sennhauser - Mon, 2010-03-15 13:38

Table of Contents

Result set with temporary sequence

Sometimes you would like to have a result set with something like a rownum. You can do this at least in the following two ways:

a) with a TEMPORARY MEMORY table:

CREATE TEMPORARY TABLE mem (
    seq  INT NOT NULL …

Taxonomy upgrade extras:  Mysql  Migration  Innodb  Hint  Primary Key  Index  Prefixed Index  Sequence  Temporary  Keyword  Auto_increment  Memory Table 

DBA wisdoms

Oli Sennhauser - Mon, 2010-03-15 13:29

Controlling developers is like herding cats.
Kevin Loney, Oracle DBA Handbook

Oh no, it’s not. It’s much harder than that!
Bruce Pihlamae, long-term Oracle DBA


Do not assume!
Unknown IT specialist


Backups ist was für Warmduscher!
(engl. Backup is for sissies!)
Unkown DBA


Yesterday (the DBA version)

Yesterday,
All those backups seemed a waste of pay.
Now my database has gone away.
Oh I believe in yesterday.

Suddenly,
There’s not half the files there used to be,
And there’s a …


Taxonomy upgrade extras:  Backup  Dba  Tuning  Database Administrator 

MySQL trouble shooting

Oli Sennhauser - Mon, 2010-03-15 11:46

Table of Contents

max_open_files warning during mysqld startup

Problem

[Warning] Changed limits: max_open_files: 1024  max_connections: 100  table_cache: 457

[Warning] Could not increase number of max_open_files to more than 1024 (request: 1070)

Explanation …


Taxonomy upgrade extras:  Trouble Shooting  Open_files_limit  Table_open_cache  Limitnofile 

MySQL Questions & Answers

Oli Sennhauser - Mon, 2010-03-15 11:15

Limitations of MySQL

Oli Sennhauser - Mon, 2010-03-15 11:01

MySQL User Defined Function (UDF) collection

Oli Sennhauser - Sat, 2010-03-13 21:16

I really like this new toy called UDF. So I try to provide some more, hopefully useful, functionality.

A list of what I have done up to now you can find here:

If you have some more suggestions, please let me know. If you need some special features as UDF talk to our consulting services if they can implement it.

Get and set InnoDB spin_wait_delay

mysql> …

Taxonomy upgrade extras:  Udf  User Defined Function 

The handler_read_* status variables

Oli Sennhauser - Sat, 2010-03-13 21:06

Because I do a lot of Performance Tuning gigs I get often in contact with these status variables. In the beginning I had a problem to understand them and now I have a problem to memorize the relation of the name and the meaning. Therefore I wrote this little summary:

Prepare the example

To show you the effect I have worked out a little example:

CREATE TABLE test (
    id    INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  , data  VARCHAR(32)
  , ts    TIMESTAMP
  , INDEX (data)
);

INSERT INTO test
VALUES …

Taxonomy upgrade extras:  Mysql  Handler  Handler Interface  Status Variables  Status 

Performance Tuning Key for MySQL

Oli Sennhauser - Sat, 2010-03-13 20:40

This MySQL Performance Tuning Key should give you a guide how to best tune you MySQL database systematically… It should also work similar for other RDBMS.

Also check our MySQL Performance Monitor

For a database configuration tuning only please look first at our MySQL database health check.

If this MySQL Database Health Check does NOT solve your problem our specialized Performance Tuning and Architecture Consultants can help you for sure!

Caution: Some recommendations are dangerous! Dangerous means …


Taxonomy upgrade extras:  Mysql  Performance  Tuning 

Hunting the core

Oli Sennhauser - Sat, 2010-03-13 20:32

Core files under Linux

When dealing with MySQL crashes it is very useful to get the core files for further debugging. I have collected all the informations I found about it and wrote it together here:

Find core files

# find $HOME -name "core*"
/home/oli/core.6440

# file core
core:      ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style

See who caused the core file:

# strings core.6440 | head
CORE
CORE
mysqld
/home/mysql/product/mysql-5.1.30/bin/mysqld …

Taxonomy upgrade extras:  Debug  Trace  Core 

Reading other processes memory

Oli Sennhauser - Sat, 2010-03-13 20:15

As you probably have experienced yet MySQL does not always provide all internal information as you might want to have them and as you are used to have from other RDBMS.

MySQL plans to improve this implementing the/a performance schema and its probably already partly done in MySQL 5.4. But who knows when this will be finished and what it contains at all…

What is not provided to me I want to gather myself… But how? Other RDBMS provide interfaces to attach applications directly to their memory to …


Taxonomy upgrade extras:  Process  Memory  Debug  Trace 

MySQL Monitoring solutions

Oli Sennhauser - Sat, 2010-03-13 19:49

Basic solutions (CLI)

Those solutions are run from the command line (CLI):

Advanced solutions

More advanced MySQL database and host monitoring solutions with graphs and/or history and/or hints are:

MySQL Performance MonitorThe FromDual Performance Monitor for MySQL/MariaDB is a monitoring solution based on Zabbix. It is freely …

Taxonomy upgrade extras:  Performance Tuning  Mysql  Monitoring  Performance Monitoring  Mytop  Innotop 

FromDual sitemap

Oli Sennhauser - Sat, 2010-03-13 19:42

Profiling MySQL with oprofile

Oli Sennhauser - Sat, 2010-03-13 14:26

Why is is data load with LOAD DATA INFILE so much faster?

Probably the answer to this question is already known. But we want to prove it and by the way learn to deal with oprofile.

For the test MySQL 5.0.28 was used and 100k rows were loaded into a table sales which looks as follows:

CREATE TABLE sales (
    sales_id       INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
  , product_name   VARCHAR(128) NOT NULL
  , product_price  DECIMAL(8,2) NOT NULL
  , product_amount SMALLINT     NOT NULL
) ENGINE = …

Taxonomy upgrade extras:  Mysql  Profiling  Oprofile  Profile 

Materialized Views with MySQL

Oli Sennhauser - Sat, 2010-03-13 13:55

MySQL Federated Storage Engine

Oli Sennhauser - Sat, 2010-03-13 13:32

What is a Federated Table?

A Federated Table is a table which points to a table in an other MySQL database instance (mostly on an other server). It can be seen as a view to this remote database table. Other RDBMS have similar concepts for example database links.

What can I do with a Federated Table?

To show what you can do with a federated table let us assume the following constellation: Two MySQL databases on two different servers. The first one called provider (it provides the data) the second one called …


Taxonomy upgrade extras:  Storage Engine  Federated Tables  General Query Log 

FromDual consulting tool collection

Oli Sennhauser - Sat, 2010-03-13 11:37

The following tools we use sometimes for our consulting engagements…

Caution: These tools are NOT for production use! Use with care!

Tools

Sample Databases

  • MySQL world: world.tgz (92 kbyte, runs with version 4.1 (tested …

Taxonomy upgrade extras:  Tool  Consulting  Memory  San  General Query Log 

MariaDB and MySQL Benchmarking

Oli Sennhauser - Thu, 2010-03-11 23:29

MySQL pluggable Storage Engines (SE)

Oli Sennhauser - Thu, 2010-03-11 23:20

One of the big advantages of MySQL is its concept of Pluggable Storage Engines. This means you can choose the most optimal Storage Engine for your needs. This also has a disadvantage: You have to know what you are doing…

If you need some help deciding which is the right Storage Engine or even strategy for you or if you want us to make an independent and vendor neutral comparison of those Storage Engines consider our FromDual Consulting Services!

MySQL provides the following storage engines:

mysql> …

Taxonomy upgrade extras:  Storage Engine  Pluggable  Solid State Disk  Rrd  Round-Robin Database  Se  Architecture  Ssd  Memory Table  Data Warehouse 

Pages

Subscribe to FromDual aggregator - FromDual all (de)