How to imporve query performance and be avoid from out of memory

  1. no idea, out of my scope of expertise.

  2. use smaller data sets? :man_shrugging:

See recommendation hardware:

Production checklist - Deploy.