Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Baron Schwartz (baronxaprb.com)
Date: Tue Jan 13 2009 - 19:07:34 CST
> If you have separate indexes on ssn and id_num, MySQL may be able to
> efficiently use an index merge optimization . See
> This is only in 5.0+ - on older versions of MySQL you may find a union
> more efficient.
And in newer versions, too. The optimizer frequently underestimates
the cost of the merge operation and the required random I/O for row
lookups. So, yes it can "use" an index merge, but... efficiency is
another question. I've seen table scans outperform a two-way index
merge by orders of magnitude.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql