MySQL Forums
Forum List  »  Optimizer & Parser

Re: Query Optimization
Posted by: Jani Patokallio
Date: June 16, 2009 03:43AM

MySQL is a relational database, not a spreadsheet, so your table structure is doomed to failure. Read up on database normalization:

http://en.wikipedia.org/wiki/Database_normalization

In short, reformat your table and data so that every attribute is one column:

id, name, brand, color, desc, price, year, site, address, url

Then your query is trivial:

select * from cars where name='Celica' and brand='Toyota' and year=1993;

Options: ReplyQuote


Subject
Views
Written By
Posted
3941
June 15, 2009 06:07AM
Re: Query Optimization
2218
June 16, 2009 03:43AM
2056
June 16, 2009 10:40PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.