Analizado los campos y tipos de datos en MariaDB

CON SELECT PROCEDURE ANALYSE  podemos obtener la respuesta de un query con los datos optimos en base a la consulta que hicimos y los datos presentes en la tabla, aca a un ejemplo:

MariaDB [training] select * from soccer_teams procedure analyse ();
+-----------------------------------+--------------+------------+------------+------------+------------------+-------+-------------------------+--------+--------------------------------
----------+
| Field_name                        | Min_value    | Max_value  | Min_length | Max_length | Empties_or_zeros | Nulls | Avg_value_or_avg_length | Std    | Optimal_fieldtype
|
+-----------------------------------+--------------+------------+------------+------------+------------------+-------+-------------------------+--------+--------------------------------
----------+
| training.soccer_teams.id          | 1            | 2          |          1 |          1 |                0 |     0 | 1.5000                  | 0.5000 | ENUM('1','2') NOT NULL
|
| training.soccer_teams.countryid   | 1            | 2          |          1 |          1 |                0 |     0 | 1.5000                  | 0.5000 | ENUM('1','2') NOT NULL
|
| training.soccer_teams.soccer_team | Boca Juniors | Flamengo   |          8 |         12 |                0 |     0 | 10.0000                 | NULL   | ENUM('Boca Juniors','Flamengo')
NOT NULL |
| training.soccer_teams.founded     | 1895-11-17   | 1905-04-03 |         10 |         10 |                0 |     0 | 10.0000                 | NULL   | ENUM('1895-11-17','1905-04-03')
NOT NULL |
+-----------------------------------+--------------+------------+------------+------------+------------------+-------+-------------------------+--------+--------------------------------
----------+
4 rows in set (0.04 sec)

Share on Facebook



This entry was posted in Principal. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>