[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about indexes
I seem to remember that Microsoft SQL Server has the concept of a "covered index" that worked something like this:
Suppose you have a table with a product_category, and a price. You query alot on product_category, so you create an index on it. You're expression might look like this:
select product_id, product_category, price from product where product_category=15245
In SQL Server, you could optimize this by creating your index using all three fields. The MySQL equivalent would be
create index whatever (product_category, product_price, product_id)
Now, using the same select statement as above, the server would return all data strictly from the index. It wouldn't even read from the table.
Does MySQL do this now, or are there plans to do something similar in the future?
This mailing list archive is a service of Copilot Consulting.