Manejando datos

Modify COLLATE of all tables and columns in MySQL-MariaDB

Posted by in MariaDB, MySQL

Working with the characters in the databases seems to have no consequences, until you come across things that do not match. In today’s post I tell you how to make it easier to change the COLLATE of the tables all to it. The reason for this entry The reason for this entry is that when making a query, it did not get the correct result. We reproduce what happened to me, and create a database, such that: CREATE DATABASE `test` /*!40100 COLLATE ‘utf8_general_ci’ */; so, let’s create a new table:…read more

Common_schema: repetitive tasks with foreach

Posted by in MariaDB, MySQL

Although we have spoken several times of this framework MariaDB MySQL-today a new feature, I bring very useful when you need to perform repetitive tasks based on consultations. It is used foreach call. Here I present a practical example of how you’ve used to perform a specific task: to replace all null to zero in a table with a lot of fields values. Locating the table fields The best way of locating the fields that will be used in our task is by using the information_schema, an internal database needed…read more

The mecanism of indexing on MySQL-MariaDB

Posted by in Databases, MariaDB, MySQL

In previous entrance related to MySQL and MariaDB I wrote one entrance related to why indexing is important, when working with databases (the article is only in spanish, but I will translate into english), and later, how to force MySQL-MariaDB to use a specific index that it is not the one chosen by MySQL (also in spanish). Today’s entrance is related to explain how works the mechanism of an index on MySQL-MariaDB tables, and what important considerations you need in order to get the best performance, and optimize your queries!…read more

Faster method: TRUNCATE or DROP a table?

Posted by in Databases, MariaDB, MySQL

I am working a a project in the University and I need to re-create a table. For that task, I’m thinking in two ways: using TRUNCATE, or dropping the table and create it again. TRUNCATE is a SQL sentence that empties a table, and for using it, you need to be granted as using DROP priviledge. autokey is reset to zero. The second option is using DROP a table, and create it again using CREATE TABLE. Para valorar de las dos opciones es más rápida, vamos a utilizar PROFILE, para…read more

Learning #MySQL at SoyData.Net

Posted by in Databases, MariaDB, MySQL

This entrance is dedicated to a new website for learning #BigData in spanish: SoyData.net. What is SoyData.net It is a collaborative online training platform on all matters relating to data in spanish. It now has 15 fully uploaded and available courses to which they have registered more than five hundred people in just two weeks. These courses address specific high demand technologies like Hadoop, MongoDB, R and cover key areas such as visualization, cloud computing or Structured Query Language (SQL). It also provides an introduction to #BigData concept for those…read more