Results 1 to 6 of 6
  1. #1
    bill shockley is offline Novice
    Windows 7 64bit Access 97
    Join Date
    Sep 2011
    Posts
    4

    wannabe google fast

    Why is my db so slow?



    Code:
    SELECT DISTINCT allMarkets.Symbol
    FROM allMarkets;
    This query returns about 5000 symbols from a table of 15 million records in about 15 seconds.

    Table is un-indexed. 4 fields: Symbol, Date, Close, Market

    "Market" field entries are one of four single letters: Y,N,M, or A.
    "Symbol" field entries are 3-5 letter symbols like MSFT or CSCO.
    "Date" is short date.
    "Close" is a single-type number like 46.76.

    All fields are occupied.

    Total database size is 377MB, which, by my calculation, is about 6 bytes per field.

    Dual core processor @~3GHz
    2GB memory

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Create a index on symbol.

    To see the importance of an index watch the free video tutorial here
    http://www.datapigtechnologies.com/f...earchform.html

    He shows performance before index and after indexing.

  3. #3
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    "Table is un-indexed"
    is probably the issue at hand. And if you want to be Google-fast, ASPX + AJAX is your route.
    Also, is this a local database? linked tables are dependent on your network connection.

    Try running the compact+repair and see if that speeds you up any. Though honestly, 15mil records in 15 seconds isn't bad.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by TheShabz View Post
    "Table is un-indexed"
    is probably the issue at hand. .
    if it's even an issue at all.

    15 seconds for any query statement on 15 million is pretty good. I personally wouldn't be complaining

  5. #5
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Use an index. It should speed up the process considerably. Indexing is a MUST when using large datasets. Otherwise it has to search every single record when it wouldn't need to.

  6. #6
    bill shockley is offline Novice
    Windows 7 64bit Access 97
    Join Date
    Sep 2011
    Posts
    4


    HTML Code:
    Create a index on symbol.
    
    To see the importance of an index watch the free video tutorial here
    http://www.datapigtechnologies.com/f...earchform.html
    
    He shows performance before index and after indexing.
    Indexing seems to have taken about 3 seconds off the
    15-second one -- it was actually more like 12 seconds
    before the indexing.

    There's on average 3400 records per symbol
    A total of about 4700 symbols
    3400 * 4700 = 16 million

    HTML Code:
    is this a local database?
    local

    HTML Code:
    15mil records in 15 seconds isn't bad.
    Instantaneous on one, 64 seconds on another with identical result, only
    difference the "distinct" stipulation.

    HTML Code:
    And if you want to be Google-fast, ASPX + AJAX is your route.
    I guess I've maxed out on speed. But I would like to
    know how google does it. Will look into ASPX + AJAX, although if it costs
    anything it probably won't happen.

    HTML Code:
    Try running the compact+repair and see if that speeds you up any.
    Had already done that. Reduced size considerably.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Simple task but must be fast
    By Colman in forum Programming
    Replies: 4
    Last Post: 09-10-2011, 05:27 AM
  2. Access Google Map?
    By dev82 in forum Programming
    Replies: 2
    Last Post: 07-15-2011, 09:35 AM
  3. Oncurrent event too fast?
    By Neutrino in forum Forms
    Replies: 24
    Last Post: 01-08-2011, 02:48 PM
  4. Replies: 2
    Last Post: 12-16-2010, 02:46 PM
  5. Access Database size Grows too fast
    By no-e in forum Access
    Replies: 0
    Last Post: 12-16-2008, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums