Back to Blog

Xano performance optimization guide

·

What is Xano?

The goal of this post is not to give an overview of Xano’s overall capabilities, but to give you some tips how to improve the Xano performance using database indexing, response caching and other methods. We wrote an extensive overview of it’s capabilities in a separate post.

Xano: Ultimate tool for no-code backend development

However in short, Xano a no-code development platform to build backend for your applications. There are plenty of different functionalities, however the core of the platform consist of following functionalities:

  • Authentication – Comes out of the box with JWE tokens and pre-built OAuth authentication solutions.
  • No-code API builder – Allows you to build complex business logic and workflows (CRUDs can be generated automatically).
  • Flexible database – Managed PostgreSQL database with the ability to manage DB triggers, indexes, data validations, etc.
  • Recurrent tasks – easy setup of recurrent workflows, which are basically equivalent to CRON jobs.

Note: In case you want to make sure your app is fast and performance-optimized, we offer Xano audits (potentially combined with WeWeb audit).


How to improve the overall Xano performance?

Xano offers several ways how to optimize the performance of its queries and API endpoints in general. The aim of this guide is to continuously add some best-practices how to optimize the performance of your Xano application.

We want to avoid providing general app architecture patterns and anti-patterns, but rather focus more on specific technical optimizations.

Database indexing

Let’s not deep-dive onto technicalities how PostgreSQL DB indexes work in general, but rather focus how and when should you use it in Xano.

When to use DB indexes in Xano?

Simple way of putting this would be that you want to create an index, when you need to improve the performance of your database query. As you can find in Xano documentation, main use-cases are following:

  • When you have a query that takes a lot of time to return the data.
  • Query consist of simple operators, such as item.amount < 0 and user.name = “Juraj”.
  • The table you are looking in has at least 10,000 records.

When should I avoid applying DB indexes in Xano?

  • If your table has a lot of insert/update operations.
  • If the combination of fields in the index has only few unique values (so called low cardinality).
  • Non-selective queries – if usually the query return a large percentage of the table’s data, you should avoid using DB indexes.

What types of indexes can I add to Xano table?

Index Type Use Case
GIN (Generalized Inverted Index) Mainly used to search through JSON data (e.g., finding a key-value pair in a JSON column).
Index Standard, simple queries. Can be simple (one column) or composite (multiple columns like age + location).
Unique Used to enforce unique values in columns (secondary IDs, slugs, etc.).
Spatial Used specifically for searching geographical data.
Search Powerful index used with Xano’s fuzzy search for text similarity.

How can I create a new index in Xano?

Let’s look directly in Xano’s documentation, where you can find step-by-step guide for creating a DB index in Xano.


API and Function caching

What is caching?

Data caching can decrease response time of some of your API endpoints from seconds to milliseconds. Xano uses REDIS caching – which uses in-memory data storage. So when calling an API endpoint, instead of actually querying the data and doing whatever the logic that is in the function stack, it will return a “cached” response immediately.

When should I implement response caching in Xano?

There are two “types” of response caching in Xano (API and Function), but they work in exactly the same way. We recommend using response caching to improve performance and free up computing resources for other operations.

  • Static or rarely-changing data – when the underlying data doesn’t change frequently.
  • Expensive queries – if the logic takes 10+ seconds. You can configure a cache reset (e.g., every hour).
  • Predictable data changes – if you know data updates daily, you can configure the cache to reset right after the update.

When should I avoid using response caching in Xano?

If an API or function is cached, it does not query data in real-time or execute function stack operations. Avoid or use caution when:

  • Querying highly dynamic data (e.g., social network feeds).
  • Any function or endpoint where you perform write or update operations (as they will not be executed).
  • Personalized responses – ensure you use "private caching" if data is user-specific.

Use add-ons when querying the data

What are Xano addons?

Addon is a feature in Xano that allows you to very easily enrich the data in your database query. Instead of doing multiple queries and merging data, it returns data from different sources within a single query.

When to use Xano addons?

  • Example 1: Enrich data based on “foreign key” – If an event table has a location_id, an addon can fetch the city/country from the location table automatically.
  • Example 2: Aggregations – If you have a list of movies and a table of reviews, an addon can return the count of reviews for each movie alongside the movie details.

Less function blocks, more filters

To illustrate what do we mean, let’s have an example: We have a table with 1,000 posts. We want to remove dots/commas, capitalize words, trim, split, and join.

  • Using separate function blocks (avg ~ 1.5s): Using a single block for each specific operation.
  • Using Xano filter within a single block (avg ~ 0.75s): Using one function block with multiple filters chained. This achieved approximately 50% lower processing time.

Custom code might help sometimes

Xano is primarily no-code, but code can optimize speed for specific tasks.

  • By using AWS lambda code, we decreased the overall time by another 60%.
  • .forEach and .map performed similarly, though .forEach can be more memory efficient for huge arrays.

Asynchronous processing

Not everything needs to be synchronous. Xano’s “Post process” feature allows you to execute logic after the API returns a response.

  • Useful for: Sending a confirmation email during signup. The user doesn't need to wait for the email provider to respond to see a "Success" message.
  • Caution: Avoid this if the user needs to know immediately if that specific operation failed.

Conclusion

Every time your application needs to scale with growing number of users, their data or growing number of features you will face some performance challenges. This is not different whether you are building your product in no-code or with traditional development approach.

If you would like to help with your Xano development, let’s have a quick call to find out how we can help you.

Want to learn more?

Book a call to discuss how we can help your project

Book a free call