zoomie | TuloZ
Convex Community2y ago
7 replies
zoomie | Tulo

Select specific db columns on server (bytes execution limit)

The following code in convex/lead.ts:
const leads = await ctx.db.query("lead").collect();
const mapLeads = leads.map((lead) => {
  return {_id: lead._id, latitude: lead.latitude,longitude: lead.longitude,};
});

Uncaught Error: Too many bytes read in a single function execution (limit: 8388608 bytes). Consider using smaller limits in your queries, paginating your queries, or using indexed queries with a selective index range expressions.


Is it possible to select only the columns (fields) I want in the db query? An SQL analogy would be:
SELECT _id, latitude, longitude FROM lead
Was this page helpful?