Add proper database indexes

Issue #1 new
Piotr Swiecicki created an issue

Apparently Active Object annotations (\@Unique, \@Indexed) are not sufficient to have the indexes created in the database. Just migrated instance to MariaDB and I can see the following database structure is used:

MariaDB [crucible]> desc AO_C024B4_TAG_ENT;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| CATEGORY | varchar(255) | YES  |     | NULL    |                |
| FRX_ID   | int(11)      | YES  |     | NULL    |                |
| ID       | int(11)      | NO   | PRI | NULL    | auto_increment |
| PERM_ID  | varchar(255) | YES  |     | NULL    |                |
| TAG_NAME | varchar(255) | YES  |     | NULL    |                |
+----------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

MariaDB [crucible]> show index from AO_C024B4_TAG_ENT ;
+-------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table             | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| AO_C024B4_TAG_ENT |          0 | PRIMARY  |            1 | ID          | A         |           5 |     NULL | NULL   |      | BTREE      |         |               |
+-------------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1 row in set (0.00 sec)

Comments (0)

  1. Log in to comment