1

I am designing a new system that will be dealing with large data set. This system is expected to have over 10 million records. A user of the system needs to check for the availability of the name he wants to register. If nothing is returned, that means the name is available, the user can then proceed to register the name.

The database needs to be optimized for search. I was considering using mysql, but i don't know if there are better options. Thanks

1 Answers1

4

All you need here is to make the username a unique index and MySQL will (generally) handle this very well.

Unfortunately, I had to write 'generally' because there can be many many other factors on your system that could slow this down. I recommend having MySQL 5.5 and the table be InnoDB. Proper indexing and configuration will go a long way in helping you.

The short of it is, MySQL/InnoDB is easily able to handle 10 million rows.

Derek Downey
  • 23,440
  • 11
  • 78
  • 104
  • Thanks for your response. I have not used mongoDb and likes before. And i have heard alot about them. Will it be wise to consider it or its like in this project. I know that they are not relational. Is there any advantage of using such non-relational database to using relational database. Thanks – Uchenna Nwanyanwu May 09 '12 at 14:11
  • 2
    all you have given us is that you have a single table of unique usernames. That's a bit broad to recommend any product. – Derek Downey May 09 '12 at 14:15
  • Not really a single table application. It is an application with many tables. But the priority for search is on the user table. It is like going to [link]godaddy.com to register a domain. You first search for the availability of the domain before registering the domain. This is exactly what i want to implement. Thanks – Uchenna Nwanyanwu May 09 '12 at 14:37
  • 1
    While this answer is concise and recommedation is great (+1 for @DTest), I have a caveat: Don't forget to tune InnoDB to access multiple CPUs (See http://dba.stackexchange.com/a/5670/877). This will enhance InnoDB performance greatly. – RolandoMySQLDBA May 09 '12 at 16:17