This query works fine
SELECT MAX(customers.created_at) lst_trx_date, business_infos.id, business_infos.name as business_name, users.name as owner_name FROM users
INNER JOIN business_infos ON users.id = business_infos.user_id
INNER JOIN customers on business_infos.id = customers.businessId
GROUP BY customers.businessId
ORDER BY customers.created_at DESC
but this query getting an eerror
SELECT MAX(orders.date) lst_trx_date, business_infos.id, business_infos.name as business_name, users.name as owner_name FROM users
INNER JOIN business_infos ON users.id = business_infos.user_id
INNER JOIN orders on business_infos.id = orders.businessId
GROUP BY orders.businessId
ORDER BY orders.created_at DESC
1st query have small data and 2nd query have a large data what should i need to consider ?
innodb_data_file_path
option setting forautoextend
is present andmax
is absent or is set to large enough value. Also check thattmp_table_size
andmax_heap_table_size
are large enough.tmpdir
points to a too-small disk partition.