Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any command to get big query execution plan?

Is there any way out to get query execution plans in big query and it's performance analysis.

like image 752
Hardik Sachdeva Avatar asked May 03 '15 06:05

Hardik Sachdeva


People also ask

How do I find the execution plan in BigQuery?

Viewing information with the Google Cloud console In the Google Cloud console, you can see details of the query plan for a completed query by clicking the Execution Details button (near the Results button).

What command is used to obtain the query execution plan?

Using the SHOWPLAN command Besides the graphical query plans, we can obtain the execution plans in text or XML format with help of the SET SHOWPLAN command.

How do you show the execution plan of a running query?

To display the estimated execution plan for a queryOn the Query menu, click Display Estimated Execution Plan or click the Display Estimated Execution Plan toolbar button. The estimated execution plan is displayed on the Execution Plan tab in the results pane.

How do you read BigQuery execution details?

To understand BigQuery tuning, we first need to be fluent in reading BigQuery execution plans. In the UI, the execution plan can be found under the query window by clicking “execution details.” A more detailed execution plan is available through the API, but we'll focus our discussion on the Web UI.


2 Answers

BigQuery now has a query explanation built into the web UI. This is what I think you're after.

enter image description here

like image 92
Graham Polley Avatar answered Sep 24 '22 17:09

Graham Polley


UPDATE 2021

This is possible now. From CLI:

$ bq show -j --format=prettyjson FULL_JOB_ID

API Call:

GET https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/jobs/{jobId}
like image 25
Alvaro Avatar answered Sep 25 '22 17:09

Alvaro