MySQL Forums
Forum List  »  Performance

Re: Storing and fast retrieving of Email address
Posted by: Phil Hildebrand
Date: March 20, 2008 08:21AM

Is your storage engine innodb?

If so, then make sure the primary key is actually the clustered index (depends how it was created) - this should keep the fields in the same page of the index as the email.

If you have 5.1, this would be an ideal place for partitioning if you used an id (integer) for email. You could just create a hash or key partition on the email id column, and that should reduce your seek times if most of the queries are by email (emailid)

IE:

create table users
( emailid bigint not null primary key,
field 1 varchar....,
field 2 .....
) engine = innodb
partition by hash (emailid) partitions 100;

Could do the same partitioning for MyISAM if that's your engine

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Storing and fast retrieving of Email address
4156
March 20, 2008 08:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.