Path

Record the highlighted operation and whether the filtered column has an Indexed badge.

Estimated time: 2 min

Read the plan and the table

To read how the database runs the query, complete the following steps. If a tab is empty, skip it and go on.

  1. Open the Explain plan tab.

    If the query is not a SELECT, or the tab is empty, skip the next steps.

  2. Record the name and Rows estimate of each highlighted operation.

    The plan highlights any operation that takes 30% or more of the total query cost, so a plan can have none or several. If none is highlighted, record the operation with the highest Cost.

  3. Record the access method.

    Access methods are how the database reads data (index scan, table scan). On PostgreSQL, an Index Scan uses an index to find rows, then fetches from the table. An Index Only Scan retrieves all needed data from the index alone. A table scan reads the entire table row by row. A table scan (sequential scan) isn’t always bad. A small table may be faster with a table scan, and an index wouldn’t help when the query returns most rows. No suitable index is a reason to consider adding an index. If an index exists but is not used, check the query conditions and the statistics.

  4. Open the Table schema details tab.

    If the tab is empty, skip the next steps. When the query uses several tables, use the table that holds the filtered column.

  5. Record whether the filtered column has an Indexed badge.

    The badge answers whether any index covers that column.

  6. Record whether the index column order matches the query’s filter and sort.

    For example, a composite index matches when its columns are in that same order.

  7. Record whether the columns the query joins on are indexed.

You have a record of the highlighted operation and of whether the filtered column is indexed.