小编Sha*_*iko的帖子

在Mysql中使用索引奇怪

Explain
SELECT `feed_objects`.*
FROM `feed_objects`
WHERE (`feed_objects`.feed_id IN
  ( 165,160,159,158,157,153,152,151,150,149,148,147,129,128,127,126,125,124,122,
    121, 120,119,118,117,116,115,114,113,111,110)) ;

+----+-------------+--------------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table        | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+--------------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | feed_objects | ALL  | by_feed_id    | NULL | NULL    | NULL |  188 | Using where |
+----+-------------+--------------+------+---------------+------+---------+------+------+-------------+
Run Code Online (Sandbox Code Playgroud)

未使用索引 by_feed_id


但当我指出的价值低于WHERE- 时,一切都正常

Explain
SELECT `feed_objects`.*
FROM `feed_objects`
WHERE (`feed_objects`.feed_id IN
  (165,160,159,158,157,153,152,151,150,149,148,147,129,128,127,125,124)) ;

+----+-------------+--------------+-------+---------------+------------+---------+------+------+-------------+
| id | select_type …
Run Code Online (Sandbox Code Playgroud)

mysql sql indexing

3
推荐指数
1
解决办法
86
查看次数

Ruby GPX文件解析器

建议什么可以解析Ruby中的GPX文件?

我尝试过gpx,但它不适用于Ruby Enterprise Edition(https://github.com/dougfales/gpx/issues/1).

我不想写一个解析器.

ruby ruby-on-rails gpx

3
推荐指数
1
解决办法
2562
查看次数

标签 统计

gpx ×1

indexing ×1

mysql ×1

ruby ×1

ruby-on-rails ×1

sql ×1