Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 91 to 100 of 135 10 Older Entries

Displaying posts with tag: tips (reset)

Recovery after DROP [ TABLE | DATABASE ]
+2 Vote Up -0Vote Down

In your recovery practice we often face the problem when data lost by execution DROP TABLE or DROP DATABASE statement. In this case even our InnoDB Data Recovery tool can't help, as table / directory with files was deleted (if you have innodb-file-per-table). And the same for MyISAM, all .MYD / .MYI / .frm - files are deleted in this case.

So first step after DROP is to restore files, and for ext3 file system there are two utilities which can help of you are fast (and lucky) enough.
First one is ext3grep …

  [Read more...]
Is DRBD the right choice for me?
+3 Vote Up -0Vote Down

It seems pretty common to find customers install DRBD for the wrong reasons. There are many pros/cons to compare DRBD to replication, but I've managed to cut down my spiel I give to customers to these two points:

  • DRBD's aim (assuming replication mode C) is to provide 100% consistency, and then as much uptime as possible.
  • MySQL Replication (with a manager such as MMM) aims to have 100% availability, at the potential loss of some data surrounding a failure.

So if you are installing DRBD with the aim of purely "availability", and are …

  [Read more...]
Just do the math!
+2 Vote Up -0Vote Down

One of the most typical reasons for performance and scalability problems I encounter is simply failing to do the math. And these are typically bad one because it often leads to implementing architectures which are not up for job they are intended to solve.

Let me start with example to make it clear. Lets say you're doing some reports from your apache log files - how many distinct visitors hit the page and stuff like that. You picked full logs because they are great in flexibility - you can run any adhoc queries and drill down as much as you like. Initially traffic was small and young and with 10000 page views a day you few days of history the queries …

  [Read more...]
Replace or Rename: that is the question.
+0 Vote Up -1Vote Down

Forget tedious hours of searching links to the renamed object and replacing them.

To save your efforts, dbForge Studio for MySQL automates renaming of tables, columns of tables, views, aliases, stored routines, local variables, triggers, events, UDFs, and users and even offers a convenient preview of the changes before applying them.

To rename an object in the script, right-click it and select the Rename option from the menu. The Rename dialog box opens where you can enter a new name and view all references to the renamed object in the …

  [Read more...]
How to pretty-print my.cnf with a one-liner
+2 Vote Up -0Vote Down

When I'm looking at a server, I often want to see the /etc/my.cnf file nicely formatted, and with comments stripped. This Perl one-liner will pretty-print the file:

PLAIN TEXT CODE:

  1. perl -ne 'm/^([^#][^\s=]+)\s*(=.*|)/ && printf("%-35s%s\n", $1, $2)' /etc/my.cnf
  2. [client]                           
  3. port                            …
  [Read more...]
The feature I love in TokuDB
+3 Vote Up -0Vote Down

Playing with TokuDB updates I noticed in SHOW PROCESSLIST unsual for MySQL State.

PLAIN TEXT CODE:

  1. mysql> show processlist;
  2. +----+------+-----------+--------+---------+------+---------------------------+-----------------------------+
  3. | Id | User | Host      | db     | Command | Time | State                     | Info                        |
  [Read more...]
webinar on Data Reduction and Smoothing in MySQL
Employee +0 Vote Up -0Vote Down

If you have missed Michael McFadden's session at the last MySQL Conference, here's a chance to catch up.

On June 11, at 17:00 UTC Michael McFadden will present at a free webinar, on the subject of Faster Data Reduction and Smoothing for Analysis & Archival in MySQL.

Don't let the "For ISVs" distract you. This session is a collection of …

  [Read more...]
webinar on Data Reduction and Smoothing in MySQL
Employee +0 Vote Up -0Vote Down

If you have missed Michael McFadden's session at the last MySQL Conference, here's a chance to catch up.

On June 11, at 17:00 UTC Michael McFadden will present at a free webinar, on the subject of Faster Data Reduction and Smoothing for Analysis & Archival in MySQL.

Don't let the "For ISVs" distract you. This session is a collection …

  [Read more...]
webinar on Data Reduction and Smoothing in MySQL
Employee +0 Vote Up -0Vote Down

If you have missed Michael McFadden's session at the last MySQL Conference, here's a chance to catch up.

On June 11, at 17:00 UTC Michael McFadden will present at a free webinar, on the subject of Faster Data Reduction and Smoothing for Analysis & Archival in MySQL.

Don't let the "For ISVs" distract you. This session is a collection …

  [Read more...]
A rule of thumb for choosing column order in indexes
+1 Vote Up -0Vote Down

I wanted to share a little rule of thumb I sometimes use to decide which columns should come first in an index. This is not specific to MySQL, it's generally applicable to any database server with b-tree indexes. And there are a bunch of subtleties, but I will also ignore those for the sake of simplicity.

Let's start with this query, which returns zero rows but does a full table scan. EXPLAIN says there are no possible_keys.

PLAIN TEXT SQL:

  1. SELECT * FROM tbl WHERE …
  [Read more...]
10 Newer Entries Showing entries 91 to 100 of 135 10 Older Entries

Planet MySQL © 1995, 2016, 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.