SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    mn
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Table Join Slow

    I'm currently have a major problem with Joining multiple tables in MySQL. The tables are joining correctly but take forever to load. Now I have the same setup in MS Access and have no problems. I want to switch this over to MySQL but this table joining is holding me back. Any suggestions?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    indexes on the join columns?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    mn
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    indexes on the join columns?
    Yes, Here the table layouts.

    Websites Table
    ------------------------------------------
    WebID | Name | Url | Email | Description

    Technology Table
    ------------------------------------------
    TechID | Name

    WebsiteTechnologies Table
    ------------------------------------------
    TechID | WebID

    My SQL Query joins by the the tables to together counting the number of website within each Technology. To display the technology Name and the count of the websites. here is the website i'm using it for.... http://www.odysen.com/Directory/Directory.php

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,251
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    yes, but are there any indexes on the join columns?

    an index on Technology.TechID

    another index on WebsiteTechnologies.TechID
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    mn
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    yes, but are there any indexes on the join columns?

    an index on Technology.TechID

    another index on WebsiteTechnologies.TechID
    I guess not. I thought it was setup with them but I guess I was mistaken. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •