Hi,
in a previous mail, I attached a test-database with
- a timegraph 'jahr', 'monat' 'tag'
- a class 'bar'
- edges with a property "asset" pointing to a record in a class
'contract'
There is also some inherence : ohcl<- price <- midpoint, volatility and so
on.
The Idea is, to define ranges at the timegraph and investigate the
properties of the connected vertices, which belong to some asset.
This is the basic graph
tag -- (out) -- ohlc -- (in) -- bar
In order to query for all data present for a contract (#58:2),
My first attempt was a simple direct query:
select expand(out('ohlc')) from tag where out('ohlc).asset = #58:2
unfortunately, an empty set was returned
However, changing to
select expand(out('ohlc')) from tag where out_midpoint.asset = #58:2
leads to the correct result.
*Question: Is it possible to query inherent edges in this way?*
I was very surprised: The query took 0.5 sec, with just a few records in
the database.
The query took so long, because the hole time-graph was examined, as
explain revealed: documentReads: 55152
After some thinking, I came out with
select expand(out('ohlc')) from (select expand(out) from ohlc where asset=
> #58:2 )
which fetches an identical result but is almost un-readable. It is 10
times faster: 0,068 sec.
My question is: I*s it possible to write a human readable query without
loosing to much performance? *I couldn't figure out a solution using the
match statement, so maybe there is another solution.
A last thing: How can I determine the effects of scaling in terms of the
execution time of the query. I wonder, whether my query will be as slow, if
some hundred contracts and some million bars are present in the database,
whereas the first attempt has probably a static execution time.
Thanks in advance
hartmut
10255010010005000
--
---
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.