mysql

How to: In MySQL what does "Overhead" mean, what is bad about it, and how to fix it?

How to: In MySQL what does “Overhead” mean, what is bad about it, and how to fix it?

In MySQL what does “Overhead” mean, what is bad about it, and how to fix it?

simple question, but its been nagging me for a while now….

what is “overhead” in MySQL, and should i be worried?

does clicking “optimize table” fix it for real?

Answer: In MySQL what does “Overhead” mean, what is bad about it, and how to fix it?

Overhead is Data_free of a table, that is The number of allocated but…

View On WordPress

The MySQL GUI Tools is a cross-platform open source suite of desktop applications for the administration of MySQL, database servers, and for building and manipulating the data within MySQL databases. The MySQL GUI Tools is a visual database design tool which integrates SQL development, administration, database design, creation and maintenance into a single and the useful development environment for MySQL database systems.

Today I learned that the total number of tweets ever made on Twitter is roughly 4x the total number of posts ever made on Tumblr.

The number of database servers they have is far, far more than 4x, and ditto for the number of staff members working on their databases. Also keep in mind the average Tumblr post is quite a bit larger than a tweet.

Not knocking Twitter by any means — their work is extremely impressive, especially their open source contributions. But given visibility into the raw numbers, I’m especially proud of the database work my former teams (tiny, tiny teams!) accomplished at Tumblr.

This was taken at a bar I frequent a while back and I just now got around to sharing it.  You get a plate put up on the wall after you finish a certain amount of unique beers in a year; I think it is 100, but I could be mistaken.  This is by far my favorite plate on the wall.  Coding nerds will get it.

An old, but nonetheless very interesting article from Facebook on the tools they’ve built to automate the management of their MySQL cluster — most probably one of the largest in operation:

MPS is a sophisticated state machine written mostly in Python. It replaces a DBA for many routine tasks and enables us to perform maintenance operations in bulk with little or no human intervention.

Original title and link: MySQL automation at Facebook (NoSQL database©myNoSQL)

How to: What is this operator in MySQL?

How to: What is this operator in MySQL?

What is this operator <=> in MySQL?

I’m working on code written by a previous developer and in a query it says,

WHERE p.name <=> NULL 

What does <=> mean in this query? Is it something equal to =? Or is it a syntax error?

But it is not showing any errors or exceptions. I already know that <> = != in MySQL.

Answer: What is this operator <=> in MySQL?

is <=> NULL-safe equal to operator

This…

View On WordPress

Bloqueo MySQL a nivel de registro

Los servidores de bases de datos nos ofrecen numerosas ventajas respecto a las bases de datos típicas (Access, SQLite,…). El caso es que para una aplicación que estoy haciendo estaba buscando información de como se bloquean las tablas innoDB (ojo, MyISAM no tiene este comportamiento) en MySQL a nivel de registro (bloqueo que se realiza automáticamente trabajando con transacciones). Básicamente, dadas dos o más transacciones activas existen estos supuestos:

  • Ambas transacciones pueden leer el mismo registro
  • Si la transacción A edita un registro, cuando la transacción B quiera editar ese mismo registro tendrá que esperar a que la transacción A finalice su trabajo.
  • Del mismo modo, si la transacción A edita un registro, cuando la transacción B quiera leer ese mismo registro tendrá que esperar a que la transacción A finalice su trabajo (Este último comportamiento es por defecto, pero podría cambiarse este comportamiento para que B leyera el valor actual de la BBDD y no el valor impuesto por A).

Dadas estas reglas, solo tendremos que bloquear tablas cuando estemos ante procesos muy específicos, por lo que MySQL nos permite tener una tasa de bloqueo baja, ideal en entornos con abundante concurrencia.

You want NoSQL? I'll give you memcached

Tony Darnell in Use MySQL to store NoSQL and SQL data in the same database using memcached and InnoDB | Scripting MySQL:

With MySQL version 5.6 (and above), you have the ability to store and retrieve NoSQL data, using NoSQL commands, while keeping the data inside a MySQL InnoDB database. So, you can use NoSQL and SQL at the same time, on the same data, stored in the same database. And the beauty is that it takes just a few minutes to setup. This post will provide you with a quick lesson on how to setup NoSQL on a MySQL InnoDb database.

I see this trivialization of the term NoSQL quite frequently in the communications signed by Oracle: “Oh, you want NoSQL? Take memcached. Now shut up!” This is quite disrespectful to their customers and the developer community in general.

Original title and link: You want NoSQL? I’ll give you memcached (NoSQL database©myNoSQL)

youtube

Here we’re demonstrating how to use the CREATE TABLE SQL statement to create a table within a database.

How to: MySql export schema without data

How to: MySql export schema without data

MySql export schema without data

I’m using a MySql database with a Java program, now I want to give the program to somebody else.

How to export the MySql database structure without the data in it, just the structure?

Answer: MySql export schema without data

Yes, you can use mysqldump with the no-data option:

mysqldump -u user -h localhost no-data -p database > database.sql 

Answer: MySql export…

View On WordPress