R
R
rinaz222022-04-12 17:54:51
MySQL
rinaz22, 2022-04-12 17:54:51

Can GROUP_CONCAT be used for large queries?

Hello. I'm doing a project where I need to retrieve data from a database. The volume depends on the request parameters (set by the user).
The query is grouped by certain columns and to get other values, such as status, I use GROUP_CONCAT.
There can be several thousand statuses in one record. To accommodate all this, I increased the GROUP_CONCAT limit
SET SESSION group_concat_max_len = 1000000;
Question: How can I optimize the query so that it is lighter and without the possibility of breaking. Those. if there are more statuses than 1000000, then the final result will be incorrect.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2022-04-12
@402d

the question arises
. What the hell is a line of a million words ready for him, shipped?
what does the model do? collects json / xml
Can some of the groupings be moved to the model level from the request?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question