Yes, MySQL will create an index on the field you specify as the
primary key. Instead of using "show table status", use "desc
tablename". That will show you which fields have indexes on them. The
field with the primary key index will have a PRI in the "key" column.
Indexes will always increase performance when use properly.
On Nov 15, 2005, at 6:47 AM, Sujay Koduri wrote:
hi all..
i have created a table (INNODB) with a primary key column.
And all the queries i am running are of the following type only.
select col1,col2... from table where primary_key_col = value
My question here is will mysql automatically create an index on
this column
which is having the primary key constraint. (This is what i am
asusming all
the time, as oracle do this)
But when i do a show table status on this table, it is giving the
index
length as 0. (does this mean there is no index on this column ?)
And if i create an index now on this primary key column, is it
going to
increase my performance anyway.
I am using mysql 4.1.14 on RHEL 3.0
Thank you
sujay
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]