• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] database integer types

Started by dtiberio,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dtiberioTopic starter

the database uses the wrong datatypes for many of the columns. here is an example in the table 'vibe_lang':

mysql> desc vibe_langs;
+---------+---------------------+------+-----+---------+----------------+
| Field   | Type                | Null | Key | Default | Extra          |
+---------+---------------------+------+-----+---------+----------------+
| lang_id | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| term    | longtext            | NO   |     | NULL    |                |
+---------+---------------------+------+-----+---------+----------------+
2 rows in set (0.03 sec)


the field lang_id only has 255 entries right now, which fit sin a tinyint. making it a bigint will slow down the database. it should probably be a smallint if the table can grow. if it is a fixed size, and will never be more than 255 entries, then it should be a tinyint.

the other tables have similar issues.

I am working on a  perl script to fix all of the column definitions. it will auto-adjust all the column lengths to be no more than 90% capacity.
  •  

PHPVibe A.

Really appreciate your feedback very much!

Similar topics (7)