Hi Enrico,
Have introduced two new properies of type link namely 'out' and 'in' on
'hasInventory' Edge and indexed the two properties.
Also tweeked the query as mentioned below :
Select @rid,quantity from hasInventory where in = #16:4 and quantity > 0
and out IN (Select @rid from Stores where [lat,lon,$spatial] NEAR
[19.195524,72.834810,{'maxDistance' : 20}] SKIP 0 LIMIT 20)
This resulted in response time to 11 secs. But still slow.
On Wednesday, 2 September 2015 15:33:06 UTC+5:30, Ajay Shenoy wrote:
>
> I have created a database with two vertices in it. *Stores*, *Products*.
> Stores have a *GeoSpatial Index*. There is an Edge '*hasInventory*' from
> store to products which holds quantity for each Product-Store relation. Now
> If I have to find a particular Product(sku) in near by stores how should I
> proceed.
> I tried like:
>
> Select @rid,name,address,lat,lon,$distance from *Stores* where @rid IN
> (Select out.@rid from *hasInventory* where *in.sku* = '8907103076739' and
> quantity > 0) and [lat,lon,$spatial] NEAR
> [19.195524,72.834810,{'maxDistance' : 20}]
>
> Its gives me result but takes around 14 seconds to give response.
>
> *Please suggest a solution for faster response time.*
>
> Thanks in advance.
>
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.