content/influxdb3/clustered/install/optimize-cluster/optimize-querying.md
With data written to your cluster, you can now begin to define and test your typical query patterns and employ optimizations to ensure query performance.
Understanding your typical query patterns helps prioritize optimizations to meet your query performance requirements.
For example, consider the following questions:
*) in your SELECT statement. Select specific
columns you want returned in your query results. The more columns queried, the
less performant the query.InfluxDB Clustered supports both SQL and InfluxQL--a SQL-like query language designed for InfluxDB v1 and specifically querying time series data.
The InfluxDB SQL implementation is a full-featured SQL query engine powered by Apache DataFusion. It benefits from a robust upstream community that is constantly improving the features and performance of the engine. Some time series-specific queries (such as time-based aggregates) are more verbose in SQL than in InfluxQL, but they are still possible.
InfluxQL is designed specifically for time series data and simplifies many time series-related operations like aggregating based on time, technical analysis, and forecasting. It isn't as full-featured as SQL and requires some understanding of the InfluxDB v1 data model.
View the query optimization and troubleshooting documentation for guidance and information on how to troubleshoot and optimize queries that do not perform as expected.
Both SQL and InfluxQL support the EXPLAIN and EXPLAIN ANALYZE statements
that return detailed information about your query's planning and execution.
This can provide insight into possible optimizations you can make for a specific
query. For more information, see
Analyze a query plan.
InfluxDB Clustered lets you define how data is stored to ensure queries are performant. Custom partitioning lets you define how InfluxDB partitions data and can be used to structure your data so it's easier for InfluxDB to identify where the data you typically query is in storage. For more information, see Manage data partitioning.
If you've followed steps to optimize and troubleshoot a query, but it still doesn't meet performance requirements, see how to report query performance issues.
{{< page-nav prev="/influxdb3/clustered/install/optimize-cluster/simulate-load/" prevText="Simulate load" next="/influxdb3/clustered/install/secure-cluster/" nextText="Phase 4: Secure your cluster" >}}