select 某函数(字段名t1) as 字段名t1 from表名force index(字段名t1) order by 字段名t1 limit 1
等价于
select 某函数(字段名t1) as 字段名t1 from表名force index(某函数(字段名t1)) order by 某函数(字段名t1) limit 1
如果想要走 字段名 t1 上的索引,并对其 order by,建议将 as 换一个名字
下面附上 MySQL 的例子:
mysql> create table t(a int, key(a));
Query OK, 0 rows affected (0.03 sec)
mysql> insert into t values(1), (-1), (2), (-2);
Query OK, 4 rows affected (0.01 sec)
Records: 4 Duplicates: 0 Warnings: 0
mysql> select abs(a) a from t use index(a) order by a limit 1;
+------+
| a |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql> select abs(a) from t use index(a) order by a limit 1;
+--------+
| abs(a) |
+--------+
| 2 |
+--------+
1 row in set (0.00 sec)