# Optimize a Pentaho Data Service

As you [Test a Pentaho Data Service](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/test-a-pentaho-data-service.md), you might notice certain bottlenecks, or parts of the transformation that could run more efficiently. If you want to improve the performance of your data service, apply an optimization technique. Some techniques are specifically designed for Pentaho Data Services. See the **Administer Pentaho Data Integration and Analytics** document to learn about other general design and optimization techniques that can improve the performance of your transformation.

| Optimization Technique                                                                                                                                                                                                | When to Use                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Service Cache](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/optimize-a-pentaho-data-service/apply-the-service-cache-optimization.md)         | <p>For a regular data service only, adjust how long data results are cached. Consider using this technique if either of the following situations apply:</p><ul><li>Your result set contains modest data sizes.</li><li>You query Big Data sources. Increasing the cache duration can help subsequent follow-on queries run more quickly.</li></ul><p><strong>Note:</strong> This optimization technique is not available for a streaming data service. It will not appear as an optimization tab if <strong>Data Service Type</strong> is set to <strong>Streaming</strong>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Query Pushdown](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/optimize-a-pentaho-data-service/apply-a-query-pushdown-optimization.md)         | <p>Handle input step queries at the source. Consider using this technique if both of the following situations apply:</p><ul><li>Your transformation contains the Table Input or MongoDB Input steps.</li><li>You are using simple or complex <code>WHERE</code> clauses that include <code>AND</code>, <code>IN</code>, or other specific operators in your query. Limits for the <code>WHERE</code> clause construction appear in <a href="/pages/2U8f31ELHw5ZL7fSfZUM">Pentaho Data Service SQL support reference and other development considerations</a>.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Parameter Pushdown](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/optimize-a-pentaho-data-service/apply-a-parameter-pushdown-optimization.md) | <p>Handle step queries at the source. Consider using this technique if both of the following situations apply:</p><ul><li>Your transformation contains any step that should be optimized, including input steps like REST where a parameter in the URL could limit the results returned by a web service.</li><li>You do not use more complex <code>WHERE</code> clauses in your query that might contain <code>IN</code> or <code>OR</code> keywords such as <code>WHERE REGION = "South" OR Code = "Yellow"</code>. Limits for the <code>WHERE</code> clause construction appear in <a href="/pages/2U8f31ELHw5ZL7fSfZUM">Pentaho Data Service SQL support reference and other development considerations</a>.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                   |
| [Streaming Optimization](/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/optimize-a-pentaho-data-service/apply-streaming-optimization.md)        | <p>For a streaming data service only, adjust the maximum number of rows and elapsed time to produce a new streaming window for processing. Consider using this technique if you are creating a data service from one of the following streaming data steps:</p><ul><li><a href="/pages/Gtt1cJOuPUuUnmXMhLU4">AMQP Consumer</a></li><li><a href="/pages/f3M7QpiUM3mG9z6GrtMN">AMQP Producer</a></li><li><a href="/pages/1TVe0nfszuRErcz9iV9I">Get Records from Stream</a></li><li><a href="/pages/SlKiIVrZWTwmIfVo8LoG">JMS Consumer</a></li><li><a href="/pages/B1mRJEaQCDsmZmvOB4ey">JMS Producer</a></li><li><a href="/pages/6nhu326qeh0EdOzkNmpW">Kafka consumer</a></li><li><a href="/pages/whf5ep0bOdJszSn23UAD">Kafka Producer</a></li><li><a href="/pages/SMb8p7o76tBj9stUNsch">MQTT Consumer</a></li><li><a href="/pages/mMioyRVWnGJU6OJJ8wPl">MQTT Producer</a></li></ul><p><strong>Note:</strong> This optimization technique is not available for a regular data service. It will not appear as an optimization tab if <strong>Data Service Type</strong> is set to <strong>Regular</strong>.</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/advanced-topics-pentaho-data-integration-overview/pentaho-data-services/optimize-a-pentaho-data-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
