Estimate costs for a connection

Version 4.0.24.20 (latest)

Connection cost estimating

Assign a sql statement to the body of the request. e.g., for Ruby, {sql: 'select * from users'}

Note: If the connection's dialect has no support for cost estimates, an error will be returned

Request

POST /connections/{connection_name}/cost_estimate
Datatype
Description
Request
HTTP Request
path
HTTP Path
Expand HTTP Path definition...
connection_name
string
Name of connection
body
HTTP Body
Expand HTTP Body definition...
body
SQL statement to estimate
Expand CreateCostEstimate definition...
sql
string
SQL statement to estimate
query
HTTP Query
Expand HTTP Query definition...
fields
string
Requested fields.

Response

200: Connection cost estimates

Datatype
Description
(object)
cost
integer
Cost of SQL statement
cache_hit
boolean
Does the result come from the cache?
cost_unit
string
Cost measurement size
message
string
Human-friendly message

400: Bad Request

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

404: Not Found

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link

422: Validation Error

Datatype
Description
(object)
message
string
Error details
Expand ValidationErrorDetail definition...
field
string
Field with error
code
string
Error code
message
string
Error info message
documentation_url
string
Documentation link
documentation_url
string
Documentation link

429: Too Many Requests

Datatype
Description
(object)
message
string
Error details
documentation_url
string
Documentation link