I'm not too familiar with the GeoJSON functionality in PostGIS.
In essence - I'm having problems with the computation of ST_AsGeoJSON(ST_Union(g)) taking too long for large g.
Is it possible to instead store the corresponding GeoJSONs alongside their geometries in a table, and then directly merge the GeoJSONs to get the desired end product?
Would that be faster than first computing the union of geometries then converting it to GeoJSON?