SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Opinion on Efficiency and Speed

    Hi, I am programming a league website. I have most all the scripts already created, but I am second guessing my structure. With my database, it is set up so that everytime a new team signs up. It creates a new table, to hold all of the members within that team. Now, my other idea was instead of having an individual table for each team, to put a variable within the long list of accounts, holding the ID of the team. Then, whenever I would like to look up who was in that team, I would do a "select * from `accounttable` where `team`='$teamid'". Which idea would be more efficient. If I were to hold 500 tables, would it have the same impact of adding a new variable to the one table? I was thinking that, since I read the names from the `accounttable` table anyways, that I could just use this. What is your opinion, or is there another way I could handle this?
    Last edited by phil5673; Jul 15, 2002 at 20:03.

  2. #2
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This makes far more sense than creating a new table for each team.
    ----Adopt-a-Sig----
    Your message here!

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    separate tables can be a bit of a problem

    for example, consider the query that selects all the teams that player X has played for...

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •