"mathias fatene" <mfatene@stripped> wrote on 04/25/2005 04:24:42 PM:
> Im sorry to disappoint you but this is an anti-performance solution.
> Use joins rathers than subqueries, and don't use joins if you can (all
> data in the mother table).
> Imagine that table2 has 30.000.000 records, and not good indexes. you
> can wait for your answer a long time.
> Best Regards
> Mathias FATENE
> Hope that helps
> *This not an official mysql support answer
I do appreciate your energy and willingness to contribute to the list. I
am not affiliated with MySQL or any of its subsidiaries and I have no
special privileges to police what happens on this list. I am a fellow
contributor just as you. With that said, I feel that I must seriously
question your level of experience and ability to form useful responses.
When you say "and don't use joins if you can (all data in the mother
table)", It seems to me that you are proposing that in order to eliminate
JOINs in queries that all data should be flattened into one single table.
Not only is this incorrect advice but it undermines the many reasons for
using a relational database system (RDBMS) in the first place. I would
love to compare the performance of a properly normalized and indexed
relational data structure against a single "flat" table for all but the
most trivial of data sets. The nomalized data will not only take up less
room on the disk but it will perform extremely well (especially for larger
data sets). The single-table model you proposed will not scale to more
than a few hundred thousand rows before the table's size becomes a
Some queries will take "a long time" to finish against 30 million row
tables, even with good indexes on them. Your extreme counter example was a
non-starter. The original poster acknowledges that they are new (no
offence intended) and I feel that your posts were hardly helpful at best
and most likely counter-productive. Please, take the time to read your
ansers from the perspective of the person you are responding to. Try to
keep in mind not only their language skills (as this is a multi-national
list) but their experience level and even sometimes their age (we have
many students looking for help on here and some of them are still
teenagers). Please be more accurate, thoughtful, and descriptive the next
time you post, OK?
With greatest humility,
Unimin Corporation - Spruce Pine