All the st_ calls to fetch dataset metadata replaced by one call: st_metadata. It's 8 times faster, because you just need to detoast postgresql data one time. The tokenize operation is made in memory using CLSTokenike2 function.