I have some questions regarding the use of group_concat
, more specifically performance. When using group_concat
you can not use limit
.
// a query retorna todos os ID's
select group_concat( id ) from table limit 5
// pelo que eu vi, a solução seria usar substring_index para pegar a quantidade X
substring_index( group_concat( id ) , ',' , 5 )
I would like to know if group_concat
somehow impairs performance, since it returns all ID's - as in the example above - and the reason limit
is ignored in the query. p>