Hello,

Supposing I have 2 tables:

product
======
- id
- name

price
=====
- id
- product_id
- sell_price
- rent_price

If I want to make a SELECT for the products having the
rent_price between 300,00 and 500,00, so I use the query:

SELECT rent_price
FROM product
LEFT JOIN price ON (product.id = price.product_id)
WHERE rent_price BETWEEN 300.00 and 500.00

My doubt is if the table product will be optimized.
Will optimization process be done over all rows from the
product table or only the rows related to the price table?

In other words:
If table price has other columns and LEFT JOIN is needed anyway,
even that would be better to move the columns sell_price and rent_price
to the product table?

My table has so many columns, and, for structural and maintainance reasons
it would be better to divide the columns in two tables, but I canīt
compromisse the application performance because of it.

Thanks,
Ronan




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to