Hi Jon

Using an index should definitely solve the problem, so it's strange that it
didn't work in your case.
Which OrientDB version are you using? And what kind of index did you define?

Thanks

Luigi

Il giorno lun 6 mag 2019 alle ore 13:44 'Jon' via OrientDB <
[email protected]> ha scritto:

> Let's say I have the following list of vertices (connected by edges) in
> the orient database:
>
>
>  [t=1] --> [t=2] --> [t=3] --> [t=4] --> [t=5] --> [t=6] --> [t=7]
>
>
> Each vertex has a timestamp t. I now want to receive the last vertex
> before a given date. Example: give me the last vertex before t=5, which is
> t=4.
>
> Currently I'am using the following query to do this:
>
>
>  SELECT FROM ANYVERTEX WHERE t < 5 ORDER BY t DESC LIMIT 1
>
>
> This is working fine when having up to let's say 1000 elements but the
> performance of that query drops with the number of elements inserted in the
> list. I already tried using an index, which improved the overall
> performance, but the problem, that the performance drops with the amount of
> elements still persists.
>
> --
>
> ---
> 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.
>

-- 

--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/orient-database/CAFZLH8kJT%2BnJZ0Uq1NnmyHfAPjuzc3%3DK0fmGOoNmg6pAwSo7%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to