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

Include number of bytes to be scanned in IO EXPLAIN plan return value #677

Closed
JamesRTaylor opened this issue Apr 25, 2019 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@JamesRTaylor
Copy link

It'd be useful to include the estimated number of bytes to be scanned in the returned JSON value of an EXPLAIN (TYPE IO) command if statistics are available. Given the result is JSON, the return value could easily be parsed by client tools to give the user a rough idea of the time it will take to execute the query.

For example, a new estBytesScanned attribute could be added to the

{
  "inputTableColumnInfos": [
    {
      "table": {
        "catalog": "hive",
        "schemaTable": {
          "schema": "tpch",
          "table": "nation"
        }
      },
      "columns": [
        {
          "columnName": "regionkey",
          "type": "bigint",
          "domain": {
            "nullsAllowed": false,
            "ranges": [
              {
                "low": {
                  "value": "2",
                  "bound": "EXACTLY"
                },
                "high": {
                  "value": "2",
                  "bound": "EXACTLY"
                }
              }
            ]
          }
        }
      ],
    "estBytesScanned": "1230000"
    }
  ],
  "outputTable": {
    "catalog": "hive",
    "schemaTable": {
      "schema": "tpch",
      "table": "test_nation"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants