By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Best way to Index large tables in MySQL database

P: 21
Hi All,

I'm very new with MySQL database tables. I'd like to be able to index columns in large tables (40gb)size. I was wondering if youknow the best way to do so, please let me know if further information is needed. Thanks in advance!

Sep 25 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,347
I'm not sure what you mean by best way. The size of a table doesn't really dictate what and how things get indexed. It's the usage that will mostly dictate what indexes you create.
Sep 25 '12 #2

P: 21
The table will be supplying data to multiple users, therefore there will be a very intense query execution. So for example, if there is a table of 50 fields, and I want to be able to create index on 10 of the columns. What would be the most efficient sql script to achieve this?
Sep 25 '12 #3

Expert Mod 10K+
P: 12,347
If you want to create 10 indexes, then you just create them. There's not a whole lot of efficiency in how you tell the database to create that index.

What I mean to say is that how you tell the database to create an index doesn't have much bearing on how that index is then later used in querying the indexed field.

What's more important is the choice of indexes. Not how you tell it to create it. And the choice is determined by usage.
Sep 26 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.