SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Advanced Database

    Hello,

    I'm not sure if this goes under PHP or Database

    I have a database with over 100k rows of search results and tracking information.

    When i try query and compile a report it takes FOREVER... is there any techniques to run faster queries ?

    the database columns are

    id | ipaddress | page | product | timedate | se_keywords

    Thanks!

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Define indexes on the columns you use to filter rows (i.e. the WHERE clauses and JOIN conditions of the query). If you do that, 100k rows should be no problem at all.

  3. #3
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yeah i know about indexes.. i just wasn't sure if there's a different method..

    how do big companies handle hundred thousands of records, millions possibly.. Definitely if you're tracking thousands of users accessing pages daily, and products.

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,215
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Shaydez View Post
    how do big companies handle hundred thousands of records, millions possibly..
    with indexes

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

  5. #5
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    lol


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
  •