Skip to content
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

Nearby command 's where conditions how to express equal? #46

Closed
huangpeizhi opened this issue Sep 6, 2016 · 3 comments
Closed

Nearby command 's where conditions how to express equal? #46

huangpeizhi opened this issue Sep 6, 2016 · 3 comments

Comments

@huangpeizhi
Copy link

I use the FIELD clause in the set command.
SET name id Field routecode abc Field stationid 123456 POINT lat lon
which "routecode" value is string

NEARBY FenceXY where routecode 69030 POINT 23.135278 113.325000 100.000000
where conditions how to express equal?

@tidwall
Copy link
Owner

tidwall commented Sep 6, 2016

FIELD routecode abc is not allowed because fields can only be numbers.

The WHERE requires two values "min" and "max".
To search for equality on a single value you can do this:
WHERE routecode 69030 69030

@huangpeizhi
Copy link
Author

Using where condition and using match conditions, which performance is good?

@tidwall
Copy link
Owner

tidwall commented Sep 7, 2016

Sorry for not getting back to you sooner. Both WHERE and MATCH have a similar performance O(n).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants