Results 1 to 3 of 3

Thread: Help with project small, fast table

  1. #1

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Help with project small, fast table

    Hello,
    I'm trying to build fast table in my database (in MsSql 2005), to store about 500,000 photos. I have application, to input them into table with 2 parameters: 'x' and 'y'. Table looks like this (columns):

    x (int) | y (int) | pict (varbinary(MAX))

    What I need is:
    -possibility to fast input photos (without 'lag' while inputing pictures one by one. I need to have the same speed after 1000 pic. as after 50,000). Now it works good (index on 'y' and 'x'), but after few thousands of pics. it's slowing down...
    -when completed, I need to find any photo by "x" and "y". It must be fast too

    x and y are unique, but I don't create it's columns as unique, to avoid checking it while inputing (I know, there are no duplicates, so checking is unnecessary)

    So, how to create fast table? Create any indexes? Or primary key? Or any other advices? I'm begginer in this issue, so I don't know, which table will be fastest one.
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Help with project small, fast table

    you should create Non-clustered index on both the column i.e X and Y.
    __________________
    Rate the posts that helped you

  3. #3

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: Help with project small, fast table

    I've tried this, but It seems to slow anyway.
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

Posting Permissions

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



Click Here to Expand Forum to Full Width