Home » Performance » MySQL » Partial index on an email column
Partial index on an email column [message #1574] Mon, 06 August 2007 15:53 Go to next message
cizara  is currently offline cizara
Messages: 3
Registered: August 2007
Location: Argentina
Junior Member
Hi, I have a table with a column email that currently have an index. The data on the table has almost all their emails from hotmail.com (like 90% over 40M). I want to do a partial index on that table to search only until the @.... Is there a way to do this or I have to do a partial index of for example 12 lenght?

Thanks,
Cizara
Re: Partial index on an email column [message #1578 is a reply to message #1574 ] Tue, 07 August 2007 13:01 Go to previous message
Speeple  is currently offline Speeple
Messages: 91
Registered: August 2006
Member
You can't make a dynamic length partial index, you must determine the optimal length and then create the index.

To determine the optimal length try something like...

Getting average length of the prefix of the email (anything before @).

If say the average length is 12.7 make the partial index length 13.


Martin Gallagher | Speeple: The latest news
Previous Topic:Multiple databases vs. multiple tables
Next Topic:MySQL large table update/insert
Goto Forum:
  


Current Time: Sun Jul 5 21:55:10 EDT 2009

Total time taken to generate the page: 0.02417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.