OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Double indexes on one field

From: Martijn Tonies (m.toniesupscene.com)
Date: Mon Oct 03 2005 - 05:29:21 CDT


> Using PhpMyAdmin, I seldom get the warning message:
> PRIMARY and INDEX keys should not both be set for column `ID`
>
> I understand its meaning, but I was wondering to what extent having a
> field indexed AND being a primary key might slow down/speed up my
> queries.
>
> Is that gonna take twice the time if I am searching on the ID field,
> just because there are two indexes?
>
> I'd like to have a rough idea of how serioulsy I need to avoid these.

Creating a PRIMARY KEY will automatically create an index.

Why would you create a second index for that field?

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql