•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 456,507 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,663 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 790 | Replies: 2
![]() |
| |
Hi,
i am having a problem with indexing. In my database, one of my table have 3 foreign key references, All these fields are indexed by default. I need to create an index for a regular seach item. is there any problem regarding performance, if i combine the primary key and the field i mentioned above for indexing? Also if i am creating an index for a primary key separately will the performance degrade? MySql didnot show any error when i created an idex for a primary key.
But it showed a warning that there is an index for same field.
Please give me your suggestion regarding this
i am having a problem with indexing. In my database, one of my table have 3 foreign key references, All these fields are indexed by default. I need to create an index for a regular seach item. is there any problem regarding performance, if i combine the primary key and the field i mentioned above for indexing? Also if i am creating an index for a primary key separately will the performance degrade? MySql didnot show any error when i created an idex for a primary key.
But it showed a warning that there is an index for same field.
Please give me your suggestion regarding this
Your primary key is already indexed by default. Creating a second index just wastes memory but should not decrease performance. If you want to know more on how MySQL handles indexes check out their documentation.
http://dev.mysql.com/doc/refman/5.0/...l-indexes.html
And for query optimization maybe look at multi-column indexes if you are passing more than one condition.
http://dev.mysql.com/doc/refman/5.0/...l-indexes.html
And for query optimization maybe look at multi-column indexes if you are passing more than one condition.
"Time is the quality of nature that keeps events from happening all at once. Lately it doesn't seem to be working." ~Anonymous
•
•
•
•
Your primary key is already indexed by default. Creating a second index just wastes memory but should not decrease performance. If you want to know more on how MySQL handles indexes check out their documentation.
http://dev.mysql.com/doc/refman/5.0/...l-indexes.html
And for query optimization maybe look at multi-column indexes if you are passing more than one condition.
Thank you very much
Last edited by SubeeshBabu : Sep 27th, 2007 at 12:56 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Sql Query (VB.NET)
- All you need for Search Engine Optimization (SEO) (Search Engine Optimization)
- Turn Off Indexing to Speed Up XP (Windows tips 'n' tweaks)
- Removing Query Strings (ASP.NET)
- All You Need for SEO (Search Engine Optimization) - Resources List (Search Engine Optimization)
- Double MySQL Query (PHP)
- Database Limit (MS SQL)
- Query Building (Database Design)
Other Threads in the MySQL Forum
- Previous Thread: My SQL Help :(
- Next Thread: Help with birthday MySQL Script


Hybrid Mode