{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/Windshaft/issues/372","labels_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/372/comments","events_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/372/events","html_url":"https://github.com/CartoDB/Windshaft/issues/372","id":101026774,"number":372,"title":"Issuing my query not in a subquery.","user":{"login":"lghamie","id":2054883,"avatar_url":"https://avatars.githubusercontent.com/u/2054883?v=3","gravatar_id":"","url":"https://api.github.com/users/lghamie","html_url":"https://github.com/lghamie","followers_url":"https://api.github.com/users/lghamie/followers","following_url":"https://api.github.com/users/lghamie/following{/other_user}","gists_url":"https://api.github.com/users/lghamie/gists{/gist_id}","starred_url":"https://api.github.com/users/lghamie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lghamie/subscriptions","organizations_url":"https://api.github.com/users/lghamie/orgs","repos_url":"https://api.github.com/users/lghamie/repos","events_url":"https://api.github.com/users/lghamie/events{/privacy}","received_events_url":"https://api.github.com/users/lghamie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-14T14:51:21Z","updated_at":"2015-08-14T15:20:00Z","closed_at":null,"body":"When the full query gets arranged by Windshaft, having my query in the subquery named  'cdbq' prevents it from using the correct index. \r\n\r\nIf I try (via psql) my query, adding the conditions that Windshaft adds, eg. 'AND \"location\" && ST_MakeEnvelope(....)'  as part of my WHERE clause, it uses the desired index.\r\n\r\nIs there any way to do this? Is there any part of the code I could override to do this? I tried grepping through it but couldn't find what I was looking for.\r\n\r\nThanks for this great software!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CartoDB/Windshaft/issues/comments/131145501","html_url":"https://github.com/CartoDB/Windshaft/issues/372#issuecomment-131145501","issue_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/372","id":131145501,"user":{"login":"javisantana","id":30147,"avatar_url":"https://avatars.githubusercontent.com/u/30147?v=3","gravatar_id":"","url":"https://api.github.com/users/javisantana","html_url":"https://github.com/javisantana","followers_url":"https://api.github.com/users/javisantana/followers","following_url":"https://api.github.com/users/javisantana/following{/other_user}","gists_url":"https://api.github.com/users/javisantana/gists{/gist_id}","starred_url":"https://api.github.com/users/javisantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javisantana/subscriptions","organizations_url":"https://api.github.com/users/javisantana/orgs","repos_url":"https://api.github.com/users/javisantana/repos","events_url":"https://api.github.com/users/javisantana/events{/privacy}","received_events_url":"https://api.github.com/users/javisantana/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T15:20:00Z","updated_at":"2015-08-14T15:20:00Z","body":"could you post your query? "}}