managing queries

Upload: karthikre

Post on 03-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Managing Queries

    1/3

    Managing Queries

    Queries are automatically generated every time you add a field to a shelf and interact with theview. Tableau offers several ways you can manage these queries once they are sent to theunderlying data source.Automatic Updates

    Cancel QueryAbandoned QueriesPrecision Warnings

    Automatic Updates

    When you place a field on a shelf, Tableau generates the view by querying the data source. Ifyou are creating a dense data view that involves many fields, the queries might be timeconsuming and significantly degrade system performance. In this case, you can instructTableau to turn off automatic updates.

    By default, automatic updates are turned on and the toolbar button is highlighted .However, it is sometimes more efficient for Tableau to execute the queries you need for yourfinal view, rather than for every intermediate step required to compose that view. You can turnoff updates by pressing F10 or the Automatic Updatestoolbar button.

    While automatic updates are turned off, you can still update the view at any time by clicking F9

    or the Run Update on the toolbar. This way, you can update your data view at anintermediate step. It is possible to enter an invalid state when automatic updates are turned off.When this happens, the view is desaturated and invalid commands are disabled. The view andcommands become available again when you click Run Update on the toolbar.

    For example, the view below has automatic updates turned off. When the aggregation for Profitis changed from a summation to an average, the view is desaturated to let you know that you

    have made a change to the view that has made the current view invalid.

    http://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_autoupdates.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_autoupdates.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_cancel.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_cancel.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_abandoned.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_abandoned.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_precision.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_precision.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_precision.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_abandoned.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_cancel.htmlhttp://onlinehelp.tableausoftware.com/v8.1/pro/online/en-us/queries_autoupdates.html
  • 8/11/2019 Managing Queries

    2/3

    Automatic Updates and Dashboards

    You configure automatic updates on a per-view basis. This means that you can have adashboard where some views are updating automatically, and others are not. But whendashboards are published to Tableau Server, automatic updates affect either none of the viewsin a dashboard, or all of the views.

    Cancel Query

    This command is used any time you want to stop a query that is in process. You may want tocancel a query that is taking a long time to complete due to the size of the data source. When aquery is taking a long time to complete, a progress dialog box opens.

    Click Cancelin the Processing Request dialog box.

  • 8/11/2019 Managing Queries

    3/3

    After canceling a query the view becomes invalid because it is in an in-between state. The resultis a blank view although all your fields are still on the shelves. To resume working with Tableau,alter the view in anyway and allow the query to complete.

    Canceling a large number of queries can result in performance degradation in the underlyingdatabase. Although the query has been abandoned by Tableau, it is still executing on thedatabase.

    Abandoned Queries

    When you cancel a query in Tableau, the database is told to stop processing the query.However, some databases do not support cancel (MS Excel, MS Access, Essbase, Microsoft

    Analysis Services 2000). If you cancel a query using one of these types of data sources, thequery is abandoned by Tableau but is still running in the background and using resources.When you have abandoned queries, an indicator appears in the bottom right corner of the

    workbook showing the number of queries still running . As queries in the background

    complete, the number will go down. It is important to monitor the number of queries running andnot let the number get too high, otherwise you will see performance degradation of both Tableauand the underlying database.

    Text, Microsoft Excel, and Microsoft Access data sources may be temporarily unavailable aftercanceling a query because of a lock performed internally. You may have to wait until theabandoned query has completed before re-connecting.

    Precision Warnings

    When you add a field to a view that contains values with more precision than Tableau canmodel, a warning icon is displayed in the bottom right corner of the status bar. For example,a value in the database may have 22 decimal places but Tableau only supports up to 15. Whenyou add that field to the view, you get a precision warning. If you click on the warning, you canread more details including the number of decimal places that have been truncated in the view.

    Remember that the precision of the data displayed in Tableau will always first be dependent onthe data in your database. If the values in your database exceed 15 decimal places, when youadd them to the view, the value is truncated and a precision warning appears.