Good afternoon

I have an autocomplete input that is associated with a 3,000 register table, in the search it is too slow.

Some solution to be faster to search

Thank you

Hi João.

To have a faster query:

  • Cache results in the query.
  • Index the text column you're searching for.

But the problem is that your query returns too many results at once. No matter what you do, it is still creating 3k DOM objects.

To prevent that, define a minimum size to the search string before refreshing the query. 3 is usually a good number.

If that isn't enough, consider other models to present data.

Hi João,

To add to what Nuno Reis said, remember that if you're using a LIKE clause in the condition, that will have a *big* performance impact, because it forces the database engine to do a full table scan, instead of using any indexes it may have.

SQL Server does let you create special indexes to use with LIKE clauses, but OutSystems doesn't provide anyway to create them, so you may want to discuss that with your DBA.


What I did was create an index in the table, I also used the cache in the aggregate and changed the max records (plus or minus 40 in my case). autocomplete was relatively fluid