Skip to content
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

Disable "executionPlan" in Rest API json response #8743

Closed
abdusahin opened this issue Jan 28, 2019 · 6 comments
Closed

Disable "executionPlan" in Rest API json response #8743

abdusahin opened this issue Jan 28, 2019 · 6 comments
Assignees
Milestone

Comments

@abdusahin
Copy link

OrientDB Version: 3.0.13

Java Version: 1.8-openjdk

OS: RedHat

Expected behavior

Do not return "executionPlan" field in the REST API response, or add configuration parameter to enable or disable it.

Actual behavior

"executionPlan" field is returned in REST API response, which results in a huge json response size.

{"result":[{"@type":"d"," ..... ,
"executionPlan":{"@type":"d","@version":0,"cost":0,"prettyPrint":"+ .....
}

Steps to reproduce

curl -v -u username:password http://localhost:2480/query/<db-name>/sql/select%20from%20<table>

@abdusahin abdusahin changed the title Disable "executionPlan" in Rest API json respose Disable "executionPlan" in Rest API json response Jan 28, 2019
@luigidellaquila
Copy link
Member

Hi @abdusahin

It makes a lot of sense and we already discussed it internally.
We'll implement it ASAP, probably with a header parameter in the REST API

I'll keep you updated

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Jan 28, 2019
luigidellaquila added a commit that referenced this issue Jan 28, 2019
set HTTP header: return-execution-plan = false
or
from JSON request body: returnExecutionPlan:”false”

Resolves: #8743
@luigidellaquila
Copy link
Member

Hi @abdusahin

I just added a quick fix for this, you can:

set HTTP header: return-execution-plan = false
or
from JSON request body: returnExecutionPlan:”false”

The fix will be released with v 3.0.15

Thanks

Luigi

@abdusahin
Copy link
Author

Woow, that's the fastest response I've ever got on github.
Thanks @luigidellaquila, I'll give it a try.

@kevin-holbrook-epicor
Copy link

From the documentation this looks like it was only added to the POST command, but what about the "GET - Query" variant?

@luigidellaquila
Copy link
Member

Hi @kevin-holbrook-epicor

As of now it is not supported, but we can consider to add it as a query string param, eg.

http://localhost:2480/query/test/sql/select from v?returnExecutionPlan=false

or as an http header

Thanks

Luigi

@octavonu
Copy link

Hello,

Do you have any solution for GET requests? It is still returning the executionPlan object.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants