-1

I had a table usernames that store user's username and password.

Structure of table usernames is given by:

CREATE TABLE `usernames` 
(
  `id`       INT NOT NULL AUTO_INCREMENT , 
  `user_id`  INT NOT NULL , 
  `username` VARCHAR(50)  NOT NULL , 
  `password` VARCHAR(100) NOT NULL , 
  `time`     TIMESTAMP    NOT NULL ,

    PRIMARY KEY (`id`),

    UNIQUE `user_id_index`  (`user_id`) /* it's primary key in users table(user infos)*/
    UNIQUE `username_index` (`username`)

) ENGINE = InnoDB;

I'm expecting more than 100,000 rows in the table. And there are only two types of queries which will be made on this table, and example of these queries are:

  • SELECT * FROM usernames WHERE username = 'brad'
  • UPDATE usernames SET username = 'newbrad' WHERE user_id = '312'

Right now I'm using InnoDB engine, I want to know whether it's better than MyISAM in this particular case or not.

Thank you in advance!

htmler
  • 380
  • 1
  • 4
  • 12

2 Answers2

1

I very much doubt you'd see any difference whatsoever with such a small database. Feel free to keep researching but probably don't worry about it, there's no wrong choice really. InnoDB is a more rigorous engine, and better for many (most?) applications, so if in doubt, pick that.

Brian
  • 6,391
  • 3
  • 33
  • 49
0

MyISAM has been worse even at read-only performance since at lest MySQL 5.1, and it has always been worse at write performance.

MyISAM has been completely deprecated in the latest version of MySQL, even the system tables are now InnoDB.

Gordan Bobić
  • 1,748
  • 13
  • 16