New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should cnpmjs support ignore case search? #450

Closed
alsotang opened this Issue Sep 23, 2014 · 13 comments

Comments

Projects
None yet
3 participants
@alsotang
Member

alsotang commented Sep 23, 2014

image

@dead-horse

This comment has been minimized.

@dead-horse

This comment has been minimized.

Member

dead-horse commented Sep 23, 2014

but search need support

@dead-horse

This comment has been minimized.

Member

dead-horse commented Sep 23, 2014

1.5.1 ping @fengmk2

@fengmk2

This comment has been minimized.

Member

fengmk2 commented Sep 23, 2014

How about performance?

@fengmk2

This comment has been minimized.

Member

fengmk2 commented Sep 23, 2014

We forget the upper case package, it's not allow for package name now.
2014-9-23 下午6:41于 fengmk2@gmail.com写道:

How about performance?

@dead-horse

This comment has been minimized.

Member

dead-horse commented Sep 23, 2014

not sure, try in cnpm's mysql first?

@fengmk2

This comment has been minimized.

Member

fengmk2 commented Sep 23, 2014

use explain to check

@alsotang

This comment has been minimized.

Member

alsotang commented Sep 23, 2014

I think LOWER(name) in LOWER(name) LIKE LOWER(?) AND tag=“latest” would lead to index disable. It’s a sql anti-pattern.
在 2014年9月23日,19:57,fengmk2 notifications@github.com 写道:

use explain to check

Reply to this email directly or view it on GitHub.

@dead-horse

This comment has been minimized.

Member

dead-horse commented Sep 23, 2014

mysql> explain select module_id from tag where name like "%A%";
+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key  | key_len | ref  | rows | Extra       |
+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
|  1 | SIMPLE      | tag   | ALL  | NULL          | NULL | NULL    | NULL |   32 | Using where |
+----+-------------+-------+------+---------------+------+---------+------+------+-------------+
1 row in set (0.00 sec)

包含前缀匹配本来就走不到索引了,tag 表不大,应该不会太慢?

@alsotang

This comment has been minimized.

Member

alsotang commented Sep 23, 2014

image

这个还是利用得到索引的。

@dead-horse

This comment has been minimized.

Member

dead-horse commented Sep 23, 2014

看上去大部分的请求都还是要走第二个的,没太大所谓,而且是 tag 表而已。我在全量库里面执行时间可以忽略。

@alsotang

This comment has been minimized.

Member

alsotang commented Sep 23, 2014

嗯嗯,也好。
在 2014年9月23日,22:08,dead_horse notifications@github.com 写道:

看上去大部分的请求都还是要走第二个的,没太大所谓,而且是 tag 表而已。我在全量库里面执行时间可以忽略。


Reply to this email directly or view it on GitHub.

@fengmk2

This comment has been minimized.

Member

fengmk2 commented Sep 23, 2014

嗯,那就先这样,后续考虑一下全文搜索服务

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment