[Maria-developers] Engine independent statistics - naming issues?
Hello, I was looking at whether column names used by EIS feature are consistent with themselves and with ther parts of the server. == Database / table / column names == There are a few naming conventions arready in use: 1. Old school: mysql.columns_priv, tables_priv Db Table_name Column_name 2. SQL STANDARD ALL CAPS HELLO FROM 1970S: information_schema.* (tables, columns, indexes, index_statistics, etc) TABLE_CATALOG (always 'def') TABLE_SCHEMA TABLE_NAME COLUMN_NAME INDEX_NAME 3. InnoDB has its own convention: mysql.innodb_table_stats, innodb_index_stats database_name table_name index_name 4. EITS feature will add: mysql.column_stats, index_stats, table_stats db_name table_name column_name index_name == Other == There are variables @@histogram_size, @@histogram_type. mysql.column_stats has columns named hist_size, hist_type. What's your opinion, should we make some renames to make things more consistent? BR Sergei -- Sergei Petrunia, Software Developer MariaDB | Skype: sergefp | Blog: http://s.petrunia.net/blog
Hi, Sergey! On Mar 27, Sergey Petrunia wrote:
Hello,
I was looking at whether column names used by EIS feature are consistent with themselves and with ther parts of the server. ... What's your opinion, should we make some renames to make things more consistent?
I don't think it matters much - these column names are internal that don't affect anything. I have a very slight preference towards database_name, histogram_size, and histogram_type column names. There is no reason to save on characters here, I'd rather follow a "don't abbrev" rule. But I hope that all the code uses column numbers/positions and never column names, right? That is, no matter how you call your columns, EIS will continue to work. Regards, Sergei
participants (2)
-
Sergei Golubchik
-
Sergey Petrunia