Code Monkey home page Code Monkey logo

Comments (3)

tidwall avatar tidwall commented on September 22, 2024 1

MATCH and WHERE add some complexity to a query. Both are linear, and are performed on each potential record. MATCH is probably a little faster than WHERE because it directly performs a comparison operation on the ID, while the WHERE needs to dig into the object fields. Both should be pretty fast in most cases, yet workflows vary so I recommend testing on your side to see which is best of you.

Also is there any performance benefit of referring the geofence as GET area test v/s defining it directly

No, both will perform the same.

from tile38.

Mukund2900 avatar Mukund2900 commented on September 22, 2024

@tidwall just had one more question regarding this. Please refer to the following query ->

SETHOOK test1 kafka://127.0.0.1:9092/bbb INTERSECTS person WHERE name 2 alice bob FENCE DETECT enter,exit OBJECT {"type":"Polygon","coordinates":[[[75.63783657767418,25.43318147102104],[75.6392084514683,25.43305944145809],........[75.63783657767418,25.43318147102104]]]}

SETHOOK test2 kafka://127.0.0.1:9092/bbb INTERSECTS person WHERE name 2 rob lob FENCE DETECT enter,exit OBJECT {"type":"Polygon","coordinates":[[[75.63783657767418,25.43318147102104],[75.6392084514683,25.43305944145809],........[75.63783657767418,25.43318147102104]]]}

as you can see the geofence is same in both the case. Does it internally treat it as 2 geofences? Or it keeps the hook on the same geofence?
If it does not treat it as same geofence i think creating a geofence first and then defining the hooks makes more sense.

from tile38.

iwpnd avatar iwpnd commented on September 22, 2024

it'll be treated as two geofences and if a devices enters the polygon it'll send two events to kafka

from tile38.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.