Analyze a Segment

The segment analyzer examines your segment and provides suggestions as to how you can improve the segment by removing database tables, adding filters, and making other changes.

The analyzer also shows you the estimated number of rows the segment query may need to access so you know if the segment can run without encountering row limits.
Tip: After you create or edit a segment, we recommend that you run the segment analyzer to check the segment database queries. This lets you fine-tune your segments to ensure they run as quickly and efficiently as possible.
  1. Open the segment you want to analyze.
  2. Click Analyze on the ribbon Home tab.
    The Segment Analyzer window opens.

    The segment analyzer lists the segment filters, tables, output levels, and the estimated number of rows the segment query examines when it runs. If the analyzer finds potential issues with the segment query, it lists the issues in the Notes column next to the applicable segment component.

    The following table describes the four segment components included on the Segment Analyzer window and lists the messages you may see in the Notes column when potential issues are found.

    Segment Analyzer Window

    Segment Component Potential Issue
    Filters This section lists the expressions used for each segment and level filter and identifies whether the filter fields are indexed in the database and whether the index is used. Custom fields can be indexed for faster queries, though too many indexes can slow down queries. Only the following message can be returned in this section.
    • The filter contains a custom field that does not have an index. To improve the performance of this query, consider adding an index on the custom field.
    Tables This section lists the tables that are used in the segment, along with the types of joins used to link the data in the tables. Two messages can be returned in this section.
    • This table is in an outer join but there are one or more filters on fields in this table. Make sure this is by design. If not, consider changing the join type to inner or changing these filters to join filters to prevent an implicit inner join.
    • This table is not used in the report. Consider removing the table from the data set. If you need to filter out rows in the parent table that do not have rows in this table, consider adding a not null filter on the join field in the parent table.
    Levels This section does not apply to segments even though it displays in the report.
    Rows This section lists the estimated number of rows that will be examined by the query. Messages display if the number of rows exceeds the threshold values for the operational and report databases. Three messages can be returned in this section. The messages vary depending on whether your site has a report database in addition to the operational database.
    • The estimated number of analyzed rows for this query is X. This value exceeds the threshold of 2,000,000 for the operational database. Consider using the report database for this report. Otherwise, it is likely this will occur automatically.
    • The estimated number of analyzed rows for this query is X. This value exceeds the threshold of 2,000,000 for the operational database. Since you have specified the operational database for this report, it is unlikely the report will execute. Consider using the report database for this report.
    • The estimated number of analyzed rows for this query is X. This value exceeds the threshold of 5,000,000 for the report database. Consider adding or refining filters to reduce the number of analyzed rows to below this threshold. Otherwise, it is unlikely the report will execute.
  3. Click X on the top right to close the Segment Analyzer window.
  4. Click X on the top right to close the segment.