Xano · PostgreSQL · Performance
What Slowed Down Our Xano/PostgreSQL Backend and How We Fixed It
On a production ATS/CRM built on Xano, with ~150k person records, ~100k companies and ~150k activities, important APIs could take 5, 10, 30 or 40+ seconds under load. I took ownership of performance. There was no single fix: each slow flow had its own cause. Here's what we found and what worked, so you can check your own Xano project for the same problems.
Why Xano endpoints get slow
Xano runs on PostgreSQL. When an endpoint is slow, the cause is usually one or more of these:
- Filtering on columns without an index, or filters written in a way PostgreSQL can't use an index for.
- Repeated database calls: N+1-like loops that fetch related data row by row.
- Inefficient joins and heavy add-ons pulling more than the screen needs.
- Triggers that loop or fire far more often than expected.
- Large responses without pagination.
Our platform had all of them in different places.
1. Index what the queries actually use
We added PostgreSQL indexes on the columns used by the slowest filters and sorts, GIN indexes for search-style lookups, and geospatial indexes for distance queries.
We also replaced an is_contact boolean, which every main list filtered on, with an indexed type column (contact or candidate).
Tip: start with your slowest endpoint's filters and sort order, not every column. Indexes also cost a little on every write.
2. Stop calling the database in loops
Some flows effectively ran 100+ database operations per request: a list query, then lookups for each row. We rewrote them as direct, consolidated queries with proper joins, so a single query returns what the screen needs.
3. Send less data
- Pagination on every list.
- Fewer returned fields: only what the screen renders.
- Role-aware responses: each user only receives the records and fields their role may see, which is both faster and safer.
4. Fix triggers and move heavy work out of the request
A few triggers looped or cascaded. We fixed them and moved heavy work to background tasks. The biggest example was CV processing, which I wrote up in a separate article.
Checklist for your Xano project
- List your 3 slowest endpoints and time them under realistic load.
- For each, note the columns it filters and sorts on. Are they indexed?
- Count database calls per request. Any loops?
- Check response size and pagination.
- Check which triggers fire on the tables involved.
More on this kind of work on my PostgreSQL performance page, or see the Talent Match case study.