Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Posts
    3

    Unanswered: how to enhance table with one million rows ?

    hello

    i have an table with about one million rows , and all my queries is just select by id , what is the best practice to enhance the performance of this table ?

    thanks

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Best answer I can give with the little detail provided: clustered index on the ID field.
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2012
    Posts
    3
    thanks for replaying gvee

    i have table `topics` like that
    id - title - topic
    1 one topic num one
    2 two topic num. two
    3 three topic num. three
    . . .
    . . .
    . . .
    1000000 million topic num. million

    and when i want to retrieve topic contents i use this query

    SELECT `topic` FROM `topics` WHERE `id`= $topicId ;

    sometimes query like that take some time one second or two

    so i wonder how can i enhance that ,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •