Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Convert database engine to InnoDB
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / General / Tutorials

Unknown User
2019-05-31 13:12:44
Like most of you know MyISAM is now nowhere good as InnoDB and it will only cause lower performance in term of write/read of large databases.

I run a separate server only for SQL database and had to change all tables to InnoDB due to poor performance.

This boosted performance for over 150% in my case.

In SQL run the following code:
SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;


Change name_of_your_db with your database name.

Now, the output will show you a list of all tables with commands like ALTER `announce` ENGINE =...

Copy all of them and run the following code:
USE `your_database_name`;
paste here all the tables you got from the previous code.
// remove ";" from the last ALTER input.


After that, you should have successfully swapped from MyISAM to InnoDB engine.
2020-01-26 22:18:26
Anyone tested this against V2 or V3? Feedback?
2020-01-26 23:18:59
I guess shadows tested his V3 seen who posted on the v3?  :unsure:
2020-01-26 23:20:54
"shadows, post: 66649, member: 20311":

Like most of you know MyISAM is now nowhere good as InnoDB and it will only cause lower performance in term of write/read of large databases.

I run a separate server only for SQL database and had to change all tables to InnoDB due to poor performance.

This boosted performance for over 150% in my case.

In SQL run the following code:
SET @DATABASE_NAME = 'name_of_your_db';

SELECT  CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM    information_schema.tables AS tb
WHERE   table_schema = @DATABASE_NAME
AND     `ENGINE` = 'MyISAM'
AND     `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;


Change name_of_your_db with your database name.

Now, the output will show you a list of all tables with commands like ALTER `announce` ENGINE =...

Copy all of them and run the following code:
USE `your_database_name`;
paste here all the tables you got from the previous code.
// remove ";" from the last ALTER input.


After that, you should have successfully swapped from MyISAM to InnoDB engine.

question please, we execute the command directly on the server with putty?
2020-01-26 23:39:03
Shouldn’t need to, just use your MySQL remote client (HeidiSQL) to connect and run queries as root, or if not then look to enable SSH tunneling then reconnect to database and run the queries
2020-01-31 20:16:25
I ran this on my test server using phpmyadmin. Seemed to work just fine.
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2020-02-01 17:29:04
"MicroMonkey, post: 67809, member: 311":

I ran this on my test server using phpmyadmin. Seemed to work just fine.


Easy way: Best way.
2020-04-11 12:53:53
hi just want to make sure since i am a noob ? if i understand it correctly i must remove the ";" from the results behind InnoDB

Result
ALTER TABLE `warnings` ENGINE=InnoDB;
Torrent Trader PDO/MVC 2021
Xampp Windows 10 21H1
Apache Version: Apache/2.4.48 (Win64)
Mysql Version: 10.4.20-MariaDB
PHP Version: 8.0.9
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728