Trouble with Query Performance Optimization in FaunaDB

Hello

I am currently using FaunaDB for a project that involves managing large datasets, and I’m running into performance issues with queries. Despite using indexing, limiting the query scope, and applying the usual optimization techniques, response times remain slower than anticipated. The queries run fine with smaller datasets, but as the number of records grows, the performance starts to degrade. :upside_down_face:

I’ve been trying to understand the internal workings of Fauna’s query processing, and I suspect the issue might be related to how Fauna handles large collections in certain contexts. I’ve tried experimenting with different query patterns, but I haven’t been able to get significant improvements in performance. :thinking:

I’d appreciate any advice from the community on what additional steps I can take to optimize query performance for large datasets. :thinking: Checked Performance on large collections and indexes Selenium guide for reference but still need advice.

Are there specific FaunaDB features or configurations that can help speed up queries in this kind of scenario? Any best practices would be helpful!

Thank you! :slightly_smiling_face:

Hi @Harper and welcome!

Fauna is very explicit about how it goes about executing queries. There is no query planner that will pick the best indexes to use and how, so that is up to you. If you have specific queries you would like help with, then please share them! It can be easier to pick apart how Fauna operates with an example to dive into relevant to you.

Otherwise, be sure to check out our Learn section in the docs, especially the pages about query patterns, working with multiple sets, and best practices.