-
Notifications
You must be signed in to change notification settings - Fork 34
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
FetchPlan not working #50
Comments
Seeing the same issue with the following query:
Where the id is from a On the Orient console this returns a |
Hi @DJWassink , @bazo , @irshadhasmat , Now i load them when the ridBag is iterated, updating it's content. |
hi @Ostico , |
Hi @sameer-shelavale , yes this is the same behaviour. The OrientDB binary protocol do not load ( expand ) automatically the bags. But you can cycle on them and they should be loaded. |
ok, |
Sameer, it depends on how high of a load you are talking about.
We ourselves were forced to cycle through bags ourselves and the efficiency
is acceptable. Besides, if you are running OrientDB locally, there's no
problem really.
…On Sat, Dec 10, 2016 at 8:16 PM, Sameer Shelavale ***@***.***> wrote:
ok,
But will it lead to lesser efficiency for very high load website ??
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWZUt-3kJa6o_pLHgH5E0TsC1ro4LXXks5rGrRQgaJpZM4GMloZ>
.
|
In my opinion, the load should be only a little bit higher than a native implementation. BTW, the returned payload are pretty the same in both cases. The socket and the connection are already established, so no delay on that. The only difference are the number of the requests payloads versus the database and the parsing time and data retrieve on the database itself. But, there is no solution for that. |
I did some digging before i found this issue and i found that here there is functionality for getting the prefetched records but it is only available via callbacks. Here's a sample code of how i made it work for me: // Store the prefetched records
$prefetched_records = [];
$cachePrefetched = function (Record $record) use (&$prefetched_records) {
$prefetched_records[(string)$record->getRid()] = $record;
};
// Use with record load
$record_params = array('fetch_plan' => '*:-1', '_callback' => $cachePrefetched);
$book = $orient_db->recordLoad(new ID(50, 0), $record_params)[0];
// Use with query - has to be async
$books_params = array('limit' => 20, 'fetch_plan' => '*:-1', '_callback' => $cachePrefetched);
$books = $orient_db->queryAsync('SELECT * FROM Books', $books_params);
// now all of the records in the the `authors` linklist are loaded in the $prefetched_records
// and can be populated to generate the output result |
Moved from
orientechnologies#11
The text was updated successfully, but these errors were encountered: