I have this query:
SELECT DISTINCT(po.mark) franquicia, COUNT(po.id) failures, GROUP_CONCAT(po.log_transaction SEPARATOR ';') logs, DATE(po.created) fecha
FROM pagos_onlines AS po
INNER JOIN usuarios_tokens AS ut ON po.usuario_token = ut.id
WHERE status = 'REJECTED'
AND created > '2017-10-03 11:00:01'
GROUP BY fecha, franquicia;
The problem is that log_transaction
is a type BLOB in the table and it stores JSON data, so the field "logs" should be a huge string with concatenated JSONs. When I run this query only one and a half JSON appeared in the field "logs", so my guess is that the memory for that field runs out of space.
Is there a way to allocate memory on the fly for a specific column when running a MySQL SELECT query?