getRecord function lasts more than 3 seconds in db with 20k entries


Every time my script starts to find the specific record to work with it stops with an error.
My database has 20k entries with 30 fields.
There is no possibility to use scripting for managing records at all in such a case.

How can I solve that?

Welcome to the Airtable community!

Automation scripts are only allowed to use a maximum of 1 second execution time. If your script needs 3 seconds to run, you cannot use it in an automation.

One method of trying to improve execution time is to request only the fields in selectRecordsAsync. For example, if you only need the email field, you could try

let query = await table.selectRecordsAsync({fields: [email]})

How sure are you that getRecord or selectRecordsAsync are the culprits in you script? Is there more to your script than is shown in your screen capture? Are there any loops later on in the script?

2 Likes