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: 1
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: Thu Nov 20 22:11:49 EST 2008

Total time taken to generate the page: 0.00958 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge