> For the complete documentation index, see [llms.txt](https://docs.yansalabs.com/simple-data-separation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yansalabs.com/simple-data-separation/technical-docs/testing-and-troubleshooting/performance-testing.md).

# Performance Testing

The **Log query time** option can be enabled for any [Separation Rule](/simple-data-separation/technical-docs/separation-rules.md) in order to access detailed execution time & triage performance issues.

{% hint style="info" %}
Log query timing is for testing only and should be disabled after use & in production environments.
{% endhint %}

<figure><img src="/files/KDl5JkhSpD65eMI6eWQs" alt=""><figcaption><p>Log query time on Separation Rule</p></figcaption></figure>

When enabled, any execution of the Separation Rule (by accessing data on the associated table) will trigger an output of detailed execution timing to the **System Log**.

<figure><img src="/files/oOvNjsvMtRvLZAgztjK6" alt=""><figcaption><p>Query Time Log</p></figcaption></figure>

The query time log is split into sections:

* **Test Details**: Separation Rule name, table, and initiating user
* **Query Time**: DB query time both before & after data separation parameters have been added. *Note: Query time is non-inclusive of function time.*
* **Function Time**: Time required for each function called during construction of the data separation query. *Note: Function time is non-inclusive of query time. Only those functions used will be shown.*
  * *getApproverTasks*: Gather all 'approval needed' records for **Approver overrides**.
  * *hasVisibilityGroups*: Assess whether user is member of a **Visibility group**.
  * *setValidAccessRequestRecords*: Gather active, approved **Access Request** records.
  * *getUserAudience*: Assess user membership for any standard **Separator field** (group, department, company, location, etc). *This can be called multiple times within a single query - timing is provided cumulatively and per-instance.*
  * *getDefinedRelationship*: Evaluate a **Defined Relationship**. *This can be called multiple times within a single query - timing is provided cumulatively and per-instance.*
* **Caching**: Details of enablement & usage of cached data
  * *Query cache*: Query cache is enabled per [Separation Rule](/simple-data-separation/technical-docs/separation-rules.md) & caches the results of the query script. Query caching improves overall query generation speed before the query is sent to the database.
  * *Session cache*: Session cache is enabled in Simple Data Separation [General Settings](/simple-data-separation/technical-docs/general-settings.md). Session caching improves performance in many areas of Separation Rule function timing.
