|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Using subpart indexes in order by/selects
asim_is
comcast.net
Date: Fri Nov 14 2003 - 12:12:34 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can anyone tell me how to structure a query to utilize a subparted index on Innodb? Haven't found any info on web search. Have an index (AGENT(4),SEARCH_NAME) that works on the select but breaks on the ORDER BY (using filesort).
To get it to use the index I have to issue something like:
select AGENT,SEARCH_NAME from PLMST where AGENT like '1001%' and SEARCH_NAME like 'SMITH%'
This uses the index, but
select AGENT,SEARCH_NAME from PLMST where AGENT like '1001%' and SEARCH_NAME like 'SMITH%' order by AGENT
uses the index, but also uses filesort.
Not really looking for help on this query, but some general information on how to construct queries to utilize index subparts/order by's.
Any help greatly appreciated.
Tom
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]