> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Atlas Data Federation Query Performance Optimization

To optimize the performance of your queries, Atlas Data Federation does the following:

- For Cloud Object Storage, it uses data partitioning to select the files that it needs to process based on query parameters. To learn more, see [Define Path Syntax for Data Stores](https://www.mongodb.com/docs/atlas/data-federation/config/path-syntax-examples.md#std-label-adf-path-syntax) and [Use Partition Attribute Types.](https://www.mongodb.com/docs/atlas/data-federation/supported-unsupported/supported-partition-attributes.md#std-label-adf-path-attribute-types)

- For Atlas clusters, it tries to "push down" as much of the query to the cluster as possible. For example, if your aggregation pipeline has a [`$match`](https://www.mongodb.com/docs/manual/reference/operator/aggregation/match.md#mongodb-pipeline-pipe.-match) stage and if it can be processed locally, Atlas Data Federation tries to process that stage in the Atlas cluster and only returns the resulting documents back to the federated layer for processing subsequent stages. To learn more, see [Querying Data in Your Atlas Cluster.](https://www.mongodb.com/docs/atlas/data-federation/query/query-federated-database.md#std-label-query-atlas)

To learn more, see [Optimize Query Performance.](https://www.mongodb.com/docs/atlas/data-federation/admin/optimize-query-performance.md#std-label-optimize-query-perf)

You can connect to Atlas Data Federation using MongoDB language-specific [drivers](https://www.mongodb.com/docs/drivers/), [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh), and [SQL Interface](https://www.mongodb.com/docs/sql-interface.md#std-label-connect-with-sql-overview). To learn more, see [Connect to Your Federated Database Instance.](https://www.mongodb.com/docs/atlas/data-federation/tutorial/connect.md#std-label-gst-connect-adf)
