:doc:`LakeFormation <../../lakeformation>` / Client / get_query_statistics

********************
get_query_statistics
********************



.. py:method:: LakeFormation.Client.get_query_statistics(**kwargs)

  

  Retrieves statistics on the planning and execution of a query.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetQueryStatistics>`_  


  **Request Syntax**
  ::

    response = client.get_query_statistics(
        QueryId='string'
    )
    
  :type QueryId: string
  :param QueryId: **[REQUIRED]** 

    The ID of the plan query operation.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ExecutionStatistics': {
              'AverageExecutionTimeMillis': 123,
              'DataScannedBytes': 123,
              'WorkUnitsExecutedCount': 123
          },
          'PlanningStatistics': {
              'EstimatedDataToScanBytes': 123,
              'PlanningTimeMillis': 123,
              'QueueTimeMillis': 123,
              'WorkUnitsGeneratedCount': 123
          },
          'QuerySubmissionTime': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ExecutionStatistics** *(dict) --* 

        An ``ExecutionStatistics`` structure containing execution statistics.

        
        

        - **AverageExecutionTimeMillis** *(integer) --* 

          The average time the request took to be executed.

          
        

        - **DataScannedBytes** *(integer) --* 

          The amount of data that was scanned in bytes.

          
        

        - **WorkUnitsExecutedCount** *(integer) --* 

          The number of work units executed.

          
    
      

      - **PlanningStatistics** *(dict) --* 

        A ``PlanningStatistics`` structure containing query planning statistics.

        
        

        - **EstimatedDataToScanBytes** *(integer) --* 

          An estimate of the data that was scanned in bytes.

          
        

        - **PlanningTimeMillis** *(integer) --* 

          The time that it took to process the request.

          
        

        - **QueueTimeMillis** *(integer) --* 

          The time the request was in queue to be processed.

          
        

        - **WorkUnitsGeneratedCount** *(integer) --* 

          The number of work units generated.

          
    
      

      - **QuerySubmissionTime** *(datetime) --* 

        The time that the query was submitted.

        
  
  **Exceptions**
  
  *   :py:class:`LakeFormation.Client.exceptions.StatisticsNotReadyYetException`

  
  *   :py:class:`LakeFormation.Client.exceptions.InternalServiceException`

  
  *   :py:class:`LakeFormation.Client.exceptions.InvalidInputException`

  
  *   :py:class:`LakeFormation.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`LakeFormation.Client.exceptions.ExpiredException`

  
  *   :py:class:`LakeFormation.Client.exceptions.ThrottledException`

  