SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Database layout design

    im not sure how advanced this is, could belong on main forum, but

    Im designing a forum-esque site, and im wondering wether is it worth seperating Post Title and Text into a seperate table for search purposes, and how much processing benefit i will gain from only having those 3 fields, compared with having 10+ fields, but i will have to to link in to another query for getting posts, which will be a far more common activity? any thoughts?
    Wilco

  2. #2
    killall -9 lusers
    Join Date
    Oct 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IMO, the most common activities deserve the most attention when it comes to increasing efficiency. For one thing, consider that your site is likely to have more than one user at a time. Besides just the length of time it takes to perform the extra query, you must also consider the usage of the system's resources. You may have one person searching and 20 people browsing the forum. If the search by itself is very efficient, but the browsing is very inneficient, the inneficient browsing will have a more detrimental effect on the searching than a single inneficient search would have on the browsing processes.

    Wow, that was a mouthful. Let's make that a bit simpler.

    If we rate efficiency on a 1-10 scale with 1 being the best, consider the following:

    x = browsing efficiency
    y = searching efficiency

    x = 2
    y = 8

    x * 20 + y = 48

    48 / (x + y) = 4.8

    x = 8
    y = 2

    x * 20 + y = 162

    162 / (x + y) = 16.2

    So if your browsing functions were more efficient than searching, your average efficiency would be 4.8, but turn that around and your average efficiency jumps to 16.2.

    Not that these particular numbers actually mean anything, but hopefully it illustrates the point.

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes I got that part, i was asking how much slower is it to search if u have a large table of many excess columns, or how much extra time it takes to link into a second table for the other data. (basically how to get x and y )
    Wilco

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to a more appropriate forum

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


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
  •