Time to Update a Database with 10,000 Entries

Discussion in 'Databases' started by litebulb1, Oct 27, 2007.

  1. #1
    Does anybody know about how long it would take to reorganize a database with about 10,000 entries?
     
    litebulb1, Oct 27, 2007 IP
  2. delhi_wala

    delhi_wala Peon

    Messages:
    75
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What do you mean by re organize.
     
    delhi_wala, Oct 27, 2007 IP
  3. litebulb1

    litebulb1 Peon

    Messages:
    151
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Lets say it was a DB of first and last name and every new entry was added to the top and once a day a script would alphabetize the whole thing.
     
    litebulb1, Oct 27, 2007 IP
  4. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Why do you want to create a new sorted table everyday?

    You can just create an index on the fields and use ORDER BY
    to retrieve it in an ordered sequence.
     
    Kuldeep1952, Oct 28, 2007 IP
  5. litebulb1

    litebulb1 Peon

    Messages:
    151
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it is more of a what if question. I know that if I had a table of first and last name I would not add new entries to the top. I am just curious to see how long it would take to reorder a DB of about 10000 records.
     
    litebulb1, Oct 28, 2007 IP
  6. flippers.be

    flippers.be Peon

    Messages:
    432
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    depends on the cpu, memory available, database software, indexes on the table, ...
    only way to know it is to try it

    if you don't want to try it but have a rough idea (if it's seconds or minutes): see how much the difference is between these statements:
    select * from table
    select * from table order by lastname, firstname
     
    flippers.be, Oct 29, 2007 IP