If a Cache clause is specified when a table is created or modified, the table will be added to the database Cache for a long time when the data in the table is accessed for the first time,
If a Cache clause is specified when a table is created or modified, the table will be added to the database Cache for a long time when the data in the table is accessed for the first time,
If a Cache clause is specified when a table is created or modified, the table will be added to the database Cache for a long time when the data in the table is accessed for the first time, in this way, the user can access the table again, and can directly access the data in the database cache, thus improving the access speed.
Therefore, we recommend that you add cache clauses to tables that are small and frequently accessed by users to improve access efficiency. Common examples include user tables, permission tables, role tables, and department tables.
Statement example for modifying a table:
Alter table TB_SYS_USER cache;
Alter table TB_SYS_USER_dept cache;
Alter table TB_SYS_USER_role cache;