How can we repair a MySQL table?

There are two ways to repair MySQL table:

1) Through cPanel:

Log in to your cPanel and go to MySQL Databases. In the section Modify Databases, select a database from the drop-down box next to Repair DB: and then click the Repair DB button.

If the database engine used by your database supports repair (for example, MyISAM supports it), you will see a list of the repaired tables within the database.

If your database engine does not support repair (e.g. InnoDB database engine), you will get the following error message:

note: The storage engine for the table doesn’t support repair

2) Through phpMyAdmin:

Open your phpMyAdmin tool and select the database whose tables you wish to repair.

A list with all the database’s tables will appear. Tick the tables you wish to repair, or simply click [Check All] to select all tables.

Click the box [With selected:] and choose Repair table. This will execute the REPAIR TABLE SQL query on the selected tables and they will be repaired.

 

What are the advantages of stored procedures, triggers, indexes?

Advantages of Triggers

Triggers are basically the statements that are executed automatically after any of the DML operation.Its basic advantage is that we dont need to invoke it again and again it will be created once and serve us for the rest of time.Triggers are not invoked from the Application end rather it

will be invoked from the Database Management System.Triggers are used to simply make a look on any of the activity going on the client side.

Advantages of Stored Procedured:

Stored procedured are the precompiled statements and one of its biggest advantage is that it speed up the performance of our application.

Advantage of Indexs:

The Main advantage of the indexes is speed. If the table having the indexes while selecting or filtering the row(s) 0r columns(s),the execution time very fast.But, if you use the indexed table the insert update and delete will be slow.


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: