I wonder why join statement is very popular, because many fields may be duplicated in result rows.
Supplier(id, name, address)
Product(id, name, detail)
Product_Supplier(id, productId, supplierId, quantity)
SELECT Product.*,
Product_Supplier.supplierId,
Product_Supplier.quantity
FROM Product
INNER JOIN Product_Supplier ON Product.id = Product_Supplier.productId
The result may look like this:
Product.id Product.name Product.detail Product_Supplier.supplierId Product_Supplier.quantity
1 'Product 1' 'bla bla' 100 20
1 'Product 1' 'bla bla' 101 30
1 'Product 1' 'bla bla' 102 20
1 'Product 2' 'bla bla' 100 120
So if product.detail
is large text then performance will be slow down, right? If it's true, why join statement is very popular?