FW: Can MySQL handle 120 million records? - Impressive! How doyou guys do that?

2002-12-18 Thread R. Hannes Niedner

-- Forwarded Message
From: Joseph D <[EMAIL PROTECTED]>
Date: Wed, 18 Dec 2002 13:55:47 -0800 (PST)
To: "R. Hannes Niedner" <[EMAIL PROTECTED]>
Subject: Re: Can MySQL handle 120 million records? - Impressive! How do you
guys do that?

thanks i actually can't post anything to the newsgroup because i'm using
Yahoo mail and there seems to be attachment error.

here is my table structure and where clause.

explain SELECT distinct Medias.pk_media_id, Organisms.common_name,
Tissues.type As tiss_type, Cells.type As cell_type,
Organelles.type As org_type, Macromolecules.type As macro_type,
Authors.last_name, Authors.organization, Medias.file_name, Medias.format,
Medias.label FROM Medias, Organisms, MediaAuthors, MediaTissues, MediaCells,
MediaOrganelles, MediaMacromolecules,
Authors, Techniques, Tissues, Cells, Organelles, Macromolecules, Admin
WHERE Macromolecules.pk_macromolecule_id = 1 and Medias.fk_organism_id =
Organisms.pk_organism_id and Medias.fk_technique_id =
Techniques.pk_technique_id
and Medias.pk_media_id = MediaAuthors.fk_media_id and
MediaAuthors.fk_author_id = Authors.pk_author_id
and Medias.pk_media_id = MediaTissues.fk_media_id and
MediaTissues.fk_tissue_id = Tissues.pk_tissue_id
and Medias.pk_media_id = MediaCells.fk_media_id and MediaCells.fk_cell_id =
Cells.pk_cell_id 
and Medias.pk_media_id = MediaOrganelles.fk_media_id and
MediaOrganelles.fk_organelle_id = Organelles.pk_organelle_id
and Medias.pk_media_id = MediaMacromolecules.fk_media_id and
MediaMacromolecules.fk_macromolecule_id = Macromolecules.pk_macromolecule_id
and Medias.fk_admin_id = Admin.pk_admin_id



//--
//Entity-relationship diagram
//--
//
//----------
//OrganismsMediasMediaAuthorsAuthors
//----------
//pk_organism_id--pk_media_id|fk_media_id
--pk_author_id
//  |fk_organism_id   |fk_author_id--|
//fk_technique_id-|  |
//fk_admin_id-||  |
//||  |
//||  |
//|   |  |
//||  |
//||  |-----
//||  |MediaTissuesTissues
//||  |-----
//||  |fk_media_id |--pk_tissue_id
//||  |fk_tissue_id--
//  ||  |
//||  |-----
//||  |MediaCellsCells
//||  |-----
//||  |fk_media_id |--pk_cell_id
//||  |fk_cell_id
//||  |
//||  |-----
//||  |MediaOrganellesOrganelles
//||  |-----
//||  |fk_media_id |--pk_organelle_id
//||  |fk_organelle_id---
//||  |
//||  |-----
//||  |MediaMacromoleculesMacromolecules
//||  |-----
//||  |fk_media_id
|--pk_macromolecule_id
//||  fk_macromolecule_id---
//||
//||  -----
//||  Techniques
//||  -----
//||---pk_technique_id
//|
//|   -----
---
//|   StudentsStudentComments
//|   -----
---
//|   pk_student_id-|
pk_comment_id
//| |-fk_student_id (not
unique)
//|
//|   -----
//|   AdminAdminComments
//|   -----
//|---pk_admin_id--|pk_comment_id
//|--fk_admin_id
//|
//|--
//|AdminMessages
//|--
//|pk_message_id
//

Re: Can MySQL handle 120 million records? - Impressive! How doyou guys do that?

2002-12-18 Thread R. Hannes Niedner
On 12/18/02 9:48 AM, "Qunfeng Dong" <[EMAIL PROTECTED]> wrote:

> But I am indeed seeing
> not-so-good performance (join on tables much smaller
> than yours takes minutes even using index) and I seem
> to read all the docs I could find on the web about how
> to optimize but they are not working for me

Why don't you just post the table structures and the join query that you
have "trouble" with? There are enough expert here on this list who are happy
to help you further optimize your database if possible.

/h




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php