-
MyIsam, Foreign Keys And Indexes
Hi. I have a question wheter should we use indexes on foreign keys in myisam(where we can't decalare foreign key constraint)
Example:
two tables.
Users(id,name,....)
Blog_posts(id,user_id,content....) user_id in blog_posts should be foreign key to users(id).
Should I create any index on user_id to optimize select operations? In table blog_post most of operations will be "select content from blog_posts where user_id =$1" . And if i should create index, which kind of index should i use?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|