{"action":"created","issue":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/4896","repository_url":"https://api.github.com/repos/parse-community/parse-server","labels_url":"https://api.github.com/repos/parse-community/parse-server/issues/4896/labels{/name}","comments_url":"https://api.github.com/repos/parse-community/parse-server/issues/4896/comments","events_url":"https://api.github.com/repos/parse-community/parse-server/issues/4896/events","html_url":"https://github.com/parse-community/parse-server/issues/4896","id":341258669,"node_id":"MDU6SXNzdWUzNDEyNTg2Njk=","number":4896,"title":"How much optimized is \"include\"?","user":{"login":"Samigos","id":9467442,"node_id":"MDQ6VXNlcjk0Njc0NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/9467442?v=4","gravatar_id":"","url":"https://api.github.com/users/Samigos","html_url":"https://github.com/Samigos","followers_url":"https://api.github.com/users/Samigos/followers","following_url":"https://api.github.com/users/Samigos/following{/other_user}","gists_url":"https://api.github.com/users/Samigos/gists{/gist_id}","starred_url":"https://api.github.com/users/Samigos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samigos/subscriptions","organizations_url":"https://api.github.com/users/Samigos/orgs","repos_url":"https://api.github.com/users/Samigos/repos","events_url":"https://api.github.com/users/Samigos/events{/privacy}","received_events_url":"https://api.github.com/users/Samigos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-14T18:50:56Z","updated_at":"2018-07-17T13:06:12Z","closed_at":null,"author_association":"NONE","body":"This is not much of an issue, but a question... I'm using the `include` constraint pretty often in my app and I would like to know how much optimized it is!\r\n\r\nFor example, let's say I have a `Post` collection, which has a `user` pointer, which has to be `include`d in a query that returns, say 50 objects. In a hypothetical scenario, let's say 10 out of 50 objects, are created by user \"a\". Is that user going to be `include`d 10 times, or 1?\r\n\r\nIf it's `include`d at all times, should I create an additional query to fetch the users, just to make sure I don't have any unnecessary reads?\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/comments/405574836","html_url":"https://github.com/parse-community/parse-server/issues/4896#issuecomment-405574836","issue_url":"https://api.github.com/repos/parse-community/parse-server/issues/4896","id":405574836,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTU3NDgzNg==","user":{"login":"flovilmart","id":364568,"node_id":"MDQ6VXNlcjM2NDU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/364568?v=4","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T13:06:12Z","updated_at":"2018-07-17T13:06:12Z","author_association":"MEMBER","body":"@dplewis you,re right, we get all the objects to fetch in the include based on the results of the 1st query and building a large `$or`  query with all the values we need to fetch from the DB."}}
{"actor":{"display_login":"flovilmart"}}