$query = "SELECT
orders.id,
orders.service,
orders.buyer_user_id,
orders.seller_user_id,
orders.grandtotal,
orders.date,
orders.items,
orders.charged,
buyer.email as buyer_email,
buyer.username as buyer_username,
buyer.firstname as buyer_firstname,
buyer.lastname as buyer_lastname,
buyer.id as buyer_id,
seller.username as seller_username,
etsy.shop_id,
billing_statements.status paid
FROM orders
LEFT JOIN etsy_order_details etsy ON orders.id = etsy.order_id
LEFT JOIN users buyer ON orders.buyer_user_id = buyer.id
LEFT JOIN users seller ON orders.seller_user_id = seller.id
LEFT JOIN billing_statements ON orders.statement_id = billing_statements.id";
Собственно, есть проблема с этим запросом, при большом количестве данных (50.000 записей).
Хочется узнать у специалистов какие тут допущены ошибки.
Заранее спасибо!