I have 2 tables
1) "products" with fields (productid PK, name, description, price)
2) "sales" with fields (salesid PK, salestime, productid, customername, customeremail, status)
I need to display data in table format as
Identifier Customer Address Billing Status
For this, I use the following query
SELECT s.salesid, p.name, p.price, s.customername, s.customeremail, s.status
FROM sales s
LEFT JOIN products p ON s.productid = p.productid
ORDER BY salestime DESC
LIMIT 0, 15
Is there a way to optimize this query to work faster?
source
share