VBAssassin
02-06-2006, 01:04 AM
Hello everyone,
Im kinda new to using index's but i understand that i must no at least the basics of them so i have been reading about them. Although the books and resources i have been using are quite detailed. They do not answer some simple questions i have!
1) If you create say 10 index's on a table, does MySQL automatically select the correct one? Or attempt to anyway?
2) What do each of the "primary", "index", "unique" and "fulltext" index types actually do? I no there index types but when should i use one and not the other and so on!
3) How would i go about creating an index on say a members table using phpMyAdmin, to speed up a query like the following?
SELECT `member_id` FROM `member_accounts` WHERE `username` LIKE 'VBAssassin' LIMIT 0 , 1
Thanks in advance :-)
Scott (VBAssassin)
Im kinda new to using index's but i understand that i must no at least the basics of them so i have been reading about them. Although the books and resources i have been using are quite detailed. They do not answer some simple questions i have!
1) If you create say 10 index's on a table, does MySQL automatically select the correct one? Or attempt to anyway?
2) What do each of the "primary", "index", "unique" and "fulltext" index types actually do? I no there index types but when should i use one and not the other and so on!
3) How would i go about creating an index on say a members table using phpMyAdmin, to speed up a query like the following?
SELECT `member_id` FROM `member_accounts` WHERE `username` LIKE 'VBAssassin' LIMIT 0 , 1
Thanks in advance :-)
Scott (VBAssassin)