{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/87","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/87/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/87/events","html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/87","id":4008099,"number":87,"title":"Queries generated by the Doctrine ORM Provider slow down untill they are processing < 1 obj/s","user":{"login":"ebernhardson","id":558434,"avatar_url":"https://avatars.githubusercontent.com/u/558434?v=3","gravatar_id":"","url":"https://api.github.com/users/ebernhardson","html_url":"https://github.com/ebernhardson","followers_url":"https://api.github.com/users/ebernhardson/followers","following_url":"https://api.github.com/users/ebernhardson/following{/other_user}","gists_url":"https://api.github.com/users/ebernhardson/gists{/gist_id}","starred_url":"https://api.github.com/users/ebernhardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebernhardson/subscriptions","organizations_url":"https://api.github.com/users/ebernhardson/orgs","repos_url":"https://api.github.com/users/ebernhardson/repos","events_url":"https://api.github.com/users/ebernhardson/events{/privacy}","received_events_url":"https://api.github.com/users/ebernhardson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2012-04-06T18:49:31Z","updated_at":"2015-04-15T17:38:04Z","closed_at":"2014-05-23T13:02:39Z","body":"Our use case is indexing a table from mysql that has ~ 10M rows.\r\n\r\nThe queries generated by the orm provider look like\r\n\r\n\r\nSELECT ...  FROM Customer c0_ LIMIT 100 OFFSET 141300\r\nSELECT ...  FROM Customer c0_ LIMIT 100 OFFSET 141400\r\nSELECT ...  FROM Customer c0_ LIMIT 100 OFFSET 141500\r\nSELECT ...  FROM Customer c0_ LIMIT 100 OFFSET 141600\r\nSELECT ...  FROM Customer c0_ LIMIT 100 OFFSET 141700\r\n\r\nThis query means that most sql servers will have to walk through the result set to return 100 items, horribly inefficient and will never finish on a table with 10M rows.\r\n\r\nI propose the queries issued via ORM should use\r\n\r\nQuery::iterate(), along with $this->objectManager->detach() for each returned object."},"comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/comments/93495230","html_url":"https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/87#issuecomment-93495230","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSElasticaBundle/issues/87","id":93495230,"user":{"login":"johnpez","id":6788619,"avatar_url":"https://avatars.githubusercontent.com/u/6788619?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpez","html_url":"https://github.com/johnpez","followers_url":"https://api.github.com/users/johnpez/followers","following_url":"https://api.github.com/users/johnpez/following{/other_user}","gists_url":"https://api.github.com/users/johnpez/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpez/subscriptions","organizations_url":"https://api.github.com/users/johnpez/orgs","repos_url":"https://api.github.com/users/johnpez/repos","events_url":"https://api.github.com/users/johnpez/events{/privacy}","received_events_url":"https://api.github.com/users/johnpez/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T17:38:04Z","updated_at":"2015-04-15T17:38:04Z","body":"Using elasticsearch 3.1.x there are now some issues with this gist.\r\n\r\nFirst off, php throws a warning due to the new progress bar method of the progress builder bar.\r\n\r\nThe one I can't figure out is that the custom provider is used if I rebuild my entire index, but if I select a document type using the commands --index=indexName --type=typeName then the custom provider is not used.\r\n\r\nAny thoughts why this might be and how to make sure it's used?\r\n\r\nThanks a bunch"}}